Move Your Wordpress Blog from Development/Staging to Production

When you are finished with development and staging reviews there are some database changes that need to be made in order for your Wordpress blog to work properly.

You can use any MySQL tool you have available, my favorite is Navicat.

Options Table

The options table stores all of the main settings for your blog. You will need to update the URLs that were originally set during installation as well as where your uploads are stored.

Update URLs

UPDATE wp_options
SET option_value = 'http://www.yourwebsite.com'
WHERE option_name = 'siteurl'
	AND option_name = 'home'

Update Upload Path

UPDATE wp_options
SET option_value = 'wp-content/uploads'
WHERE option_name = 'upload_path'

Galleries

If you have galleries in your posts you will need to update the URLs for the images to your production URL.

Update Image URLs

NOTE: The ‘localhost’ value below should match what you entered during installation on your development/staging server.

UPDATE wp_posts
SET guid = REPLACE(guid, 'localhost', 'www.yourwebsite.com')
WHERE post_type = 'attachment'
	AND post_mime_type = 'image/jpeg'


Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Related Posts

Tags: , , ,

Leave a Reply





Donate

If you found this article useful and would like to see more like it this please consider making a donation.

Sponsors