Main menu:

Links

Site search

Categories

August 2008
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Tags

Blogroll

Import a Large (>2MB) WordPress Blog

Today I needed to set up a staging server to do some experiments with our YLF theme. After setting up the database and installing WordPress, I wanted to import the current contents of YLF to this new site. Since 2.2, WordPress has had the ability to import and export the contents of the blog database (posts, comments, categories, etc.). The contents are exported as an extended RSS file (basically just a text file in a format the blog software understands).

The procedure is simple:

  1. Export: Go to the admin pages of your current blog. Inside the “Manage” menu, press “Export”. You will specify a destination folder and the file will be saved there.
  2. Import: Go to the admin pages of your new blog. Inside the “Manage” menu, press “Import”. Pick the file you saved in step 1 and the contents will be imported into the new blog.

Easy. Unless, that is, your blog contents happen to be larger than 2MB. In this case you need to do some extra work. If you have access to your php.ini file you can just set the following variables:
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 200
max_input_time = 200

I found that the first two variables above were already in my php.ini file, but were set to 2MB and 8MB respectively. I had to add the second two variables. If you don’t have direct access to php.ini, then you need to set these variables in your .htaccess file, which lives in the root of your website. This blog entry shows how.

You then need to restart the php server for these settings to take effect. That is easy on my local staging server, but I’m actually not sure how I would do it on our production server that is hosted by MediaTemple.

Once you are done with the import, it is probably a good idea to set the four variables above back to their default values.

Comments

Pingback from The Blog Easy » Replicate your bbPress Forum Locally for Development
Time August 17, 2008 at 5:26 pm

[...] to ensure that phpMyAdmin loaded the file. These are the same steps that you need to take before importing a large WordPress blog, namely, setting the following variables in your “php.ini” [...]

Write a comment