Build Your Own Business Website header image

How to Transfer a WordPress Site from a Development Server To a Live Server – Part 8 – Search and Replace Old URLs

Difficulty Level -

Filed Under Topics - , ,

Listed Under Lesson Subjects - ,

Applies to -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

This is the eighth part of How to Transfer a WordPress Site from a Development Server To a Live Server tutorial series. In this session we use the Search and Replace plugin that will check existing hard coded URLs and replace them with new URL. This is a cool and powerful tool, yet dangerous so we make sure that we backup the site database first before activating the plugin.

Video Transcript

Now the one thing we’re going to do though is make sure that we don’t have any existing hardcodded URLs either in Thesis or in my plugins. So we’re going to go ahead and add a new plugin and we’re going to use this cool but very dangerous plugin called Share and Replace. I mean, not Share and Replace, I’m sorry… Search and Replace. It’s a cool plugin because it’s very powerful. I guess you really have to spell something if you want it to show up properly. It’s a cool plugin but it’s also very powerful and therefore, dangerous. If I wasn’t working off of a backup right now, I would backup my database first and in fact, I’m going to backup the database first just so that you can see what this looks like.

So here we are now in the database as it’s been upgraded. So now all of our tables are in this database. You can see Relief App now has 15 tables in it and before it used to be empty. I’m just going to show you how to back this up. It’s a very simple task to do and we’re just going to go ahead and go to the database. And we come over here to export.

If you are using Blue Host or Host Gator or InMotion Hosting or iPower Web, they’re using a later version of mySQL than GoDaddy is using. And so the screens look a little bit different but it’s still the same thing really. The screen for… the screen doesn’t automatically give you all of these choices. You know, it gives you a simple backup and then yeah, the opt-in configure options. It doesn’t really matter that much. It’s pretty much the same thing here. We’re just going to pick a zip archive for this export and then we just say go. And what happens is it takes the entire database, all the database tables, put some into… zip some up into a zip file and then downloads it to your computer so you can see now that database has been downloaded here.

So I wasn’t going to backup the database but actually, it makes a lot of sense. Anytime you muck about with the database, you may as well back it up first because it’s so simple to do.

Okay and then we come back over here to… in Serach and Replace and we’re going to install that plugin. It’s important to note that changes that we make in this plugin cannot be undone so the only way to fix anything that we screw up now will be to restore this backup. So that’s something to keep in mind but what we’re doing is very simple.

And so we’ll come over to tools and Search and Replace and then what we want to search for is the old URL. And so in this case, that was Relief App or relief.tailoringtheweb.com. And first, what we’re going to do is just search to see if that exists anywhere in the database. So we hit go like this and it’s going to tell us if it exists anywhere and if it does exist, to what extent. And you can see right now that it’s saying that it actually exists twice in the Options tables and 180 times in posts. Now most of those times are in revisions but nevertheless, if we look at the results here, you can see that it exists here in an option… well, I guess these are options for Plugin Buddy and those were the Plugin Buddy options for… when this was created. I think the moment… we won’t actually change those. We’re going to leave those as they are and then here if we look at our results, we can see that you know, the places in which this actually exists are in things like inserted images. The images that we inserted when use the old address… well actually, isn’t that interesting? This has, in fact, does not have that problem. I’m trying to find reliefapp.com.

It doesn’t look like it changed them.

It did change them which is what I expected it to do. No, it’s exactly what I expected to do. I expected it to change them and I did not expect it to change them in the Options database, in the Options table. So the Search and Replace function wasn’t absolutely necessary in this latest version of Backup Buddy because it actually did the full job and didn’t leave anything… didn’t leave any remnants in the database of the old URL.

0 Comments… add one
0 comments… add one

Leave a Comment