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

How To Survive A Good Google Dinging

This is a great demonstration of what can happen with unnatural linking schemes and getting hosed by using link farms. This company did some black-hat SEO and it came back to bite them. Luckily the article shows that it is possible to recover from a Google update nightmare, but

SEO Update: American Metals

Since SEO is our specialty – we know what it takes to put a website on page 1. When American Metals came to us they were back past page 10 for a lot of their keywords and getting about 50 users per month on average on the website.

Maintaining The Correct Keyword Density

Keyword density, by definition, is the number of times, expressed in a percentage, that a particular keyphrase or keyword appears in a body of text. So if your keyword appears 4 times and the number of words on the page is 200 then your keyword density is 2%.

Client Spotlight: Pye Law

Tom Pye is a heck of a guy. Dedicated to his clients and serious about his business. He chose Livewire, the best Gainesville web design team in the businesses to create and promote his online presence. We remade his website and optimized it to the hilt. In just

Database Projects

We are database junkies. Simply put, you can’t beet the flexibility and scalability that databases offer us in the web design world. We prefer using MySQL which is the most common database for web projects. It integrates with PHP perfectly and together there is simply nothing more powerful.

Moving Your Website To A New Host

Sometimes it’s easy, most of the time it is not. What a headache! If you’ve moved hosts and domains several times you’re probably an old hand at it; if not, you’re in trouble. You’ll probably need the assistance of someone that has some experience in this area. Choosing