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

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.

To Gimp or Not To Gimp

In the world of photo editing, adobe photoshop is king. They really do have an amazing product. It’s sleek, works great, and is very robust sporting dozens and dozens of functions and endless possibilities for the graphic artist.  Photoshop is also very, very expensive. The entire Adobe creative

Search Engine Optimization

More important than ever and we’re at the leading edge. One of our best success stories is Rose Petals Nursery. We’ve been doing optimization for them for some time now with some great results. We’re dominating from top to bottom. Just check out this high level, competitive keyword: Old Garden

Phase 2 of Little Diamond Models is Complete

Phew! It took about 4 months of hard work but we finally finished phase 2 of one of our favorite client’s websites: Little Diamond Models. This is a huge website with a ton of great features. We started this project not even a year ago and it already

Another Mouse Burned

This makes my 7th mouse in less than 18 months. incessant clicking has it’s consequences … and costs …..

contractor website design

Why Contractors Need Professional Website Design to Stay Competitive

In today’s digital-first world, a contractor’s website is more than just an online presence—it’s a powerful tool to attract, engage, and convert potential clients. Whether you’re a general contractor, plumber, electrician, or specialize in any other trade, having a well-designed website can set you apart from competitors and