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

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

Neon AI on a keyboard

How Contractors Can Use AI to Work Smarter, Not Harder

Brought to you by Livewire – Web Design and Digital Solutions for Contractors In an industry where time is money and efficiency is key, artificial intelligence (AI) is no longer just a tech buzzword—it’s a practical tool that forward-thinking contractors are starting to use every day. From saving

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

Better Than Notepad: Notepad ++

We love this little program. It’s a replacement for Notepad called Notepad++. It’s like notepad on steroids. Lots of  new, useful functions – essentially, everything Microsoft neglected to put into their product,; open source, once again, has provided a better alternative. Easy find/replace functions, even in files so

Answerhub versus WordPress

Recently we worked on a project with intent to use AnswerHub as the primary vehicle for user interaction. After spending some time in AnswerHub’s admin we discovered that they don’t provide anything that you cannot accomplish with easy under the WordPress hood. While AH supplies you with a

WP: Adding a HTML5 Search Form

A simple script from your local Gainesville Web Designer. [code scroll=”false” language=”htmml”] <form role=”search” method=”get” class=”search-form” action=”<?php echo home_url( ‘/’ ); ?>”> <label> <span class=”screen-reader-text”><?php echo _x( ‘Search for:’, ‘label’ ) ?></span> <input type=”search” class=”search-field” placeholder=”<?php echo esc_attr_x( ‘Search …’, ‘placeholder’ ) ?>” value=”<?php echo get_search_query() ?>” name=”s” title=”<?php echo esc_attr_x( ‘Search