Home » Experts Only » Updating WordPress Database After Website Move

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

Maintaining Correct Site Structure

One of the biggest holes in a client’s SEO (pre livewire SEO, that is) is almost always the site structure. So many SEO companies focus on content and backlinks that quality code is often overlooked. There are many cases where we have come into the tail end of

Session Timeouts

We’re currently fixing a set of issues with a shopping cart created through a different developer for a local client. They did a pretty good job but forgot about session timeouts. A lot of developers gloss over this aspect of their ecommerce site and unfortunately customers pay the

ADA Compliance

ADA compliance refers to the compliance of websites with the Americans with Disabilities Act, a federal law in the United States that requires businesses and organizations to make their goods and services accessible to people with disabilities. In the context of websites, this means ensuring that individuals with

New apps coming down the pipe

We have 6 new apps coming out over the next few months. Very excited to roll these out – unfortunately we can’t give you too many details but we have a couple apps geared toward attorneys and the legal industry, one that deals with product shipping and another

Offline linking

This is a profound point. A lot of linking takes place offline. Sounds weird but many great links sprout from the personal relationships you make as a business. Noteworthy links can be found at your local chamber of commerce just like any Hotfrog or elocal directory site. “This

Linking Your G+ Page To Your Website

We always get asked: Does anyone use G+? Yes. Is it worth it? Again, Yes. Using Google’s products would obviously help your standing with their search algorithm. We don’t know this to be technically true but it certainly seems so in our experience. The more you use and