Updating WordPress Database After Website Move

Boy life sure would be easy if WordPress used relative URL’s throughout the menu and post content but that simply isn’t going to happen, they’ve made that clear. Changing the URL in the admin Settings would then be all you need to do, making moving installations a breeze. Not the case, we should stop crying about it.

There are a few plugins that will migrate WordPress without much fuss. Our favorite is All in One Migrate. The free version only allows migrations of 500MB or less.

If you’re forced to do a manual transfer, all you’ll need is a couple additional steps. We’ll assume you changed the URLs in your admin settings. Now simply log into your hosting cpanel and get to PHPMyAdmin, then find your database. If you need your database name then head over to your file manager and locate the wp-config.php file in the website’s main directory. It’s there under db_name.

Once you’ve located your website’s database in PHPMyAdmin, select SQL (see image below) to enter the following statements, replacing the new and old URL’s with your values. Be sure the table names match up, yours may have the prefix wp_, or more likely something like wp_123_. Just be sure the table names match when you execute this SQL. Be sure you’ve updated your wp_options table – this is already updated if you changed the URL in your admin Settings.

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

wordpress change url database

More Web Design Blog Content

Gatorland Kubota Has A New Website

A great new site for a great company with new ownership. Gatorland Kubota sells and services all kinds of farm and lawn equipment. A family owned and operated business there is no doubt that they want the best for their customers. After all, they chose livewire didn’t they?

Matt Birk has a new website

This is responsive website with layout originally conceived by HTML5. Clean and simple, it is just what the doctor, er, lawyer ordered. Matt needed something up quick, but didn’t have to sacrifice quality. WIthin 2 days we had a simple design up that he can be proud of.

What we’ve been up to lately

Here’s what’s been going on at Livewire in the last few weeks – because, well, why not? It’s a blog ,isn’t it? Finishing up the LDM iphone app – which has been a big project that has presented us with some unique challenges. The Android version is likely

Thomas Jackson Updates

John Pailing and I have been hard at work upgrading what is already an incredible website. We have made several layout changes and are playing with a few ideas that will really add to the depth and relevance of the site. It is truly an honor to be

Gainesville Web Marketing

North West Mini Storage and Warehouse is a new client of ours. We started optimizing their site about 3 weeks from the date of this post. Already a page 1 contender, our client now enjoys a surge in search engine traffic – all organic, all of it white

Eat More Protien

Meat in your website diet is needed – you’re probably in optimization atrophy … What is meat for your website? Content. Your site need fresh content added to it on a regular basis. Good content. Compelling content. But most of all, it need to be original content. That means