Build Your Own Business Website header image

Create a Development Copy of your Live WordPress Site on a Subdomain – Part 2 – Create the Development Site

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.

In this session, we take an extra step before we import the live database to the new database to check if all files are working properly. After checking, we export the live database.

Video Transcript

Step six is to start the site and run the installation routine. Now you notice we’re not importing this database yet.

Step Six – Start the Site and Run Install

First thing we want to do is actually get the site up and running with the files that we have. We want to make sure that these files will actually run a site. So, essentially what we’re doing is we are taking an extra step against the possibility that there’s an error some place. Because if this extra step doesn’t work, we know the error is in our files, not in the database.

Come back over here and we just run this site again and here we are. It says, “Welcome”, “WordPress”. Now because the WordPress has all of its necessary files to run, it just doesn’t have any database to run. So when WordPress comes across the opportunity to have all of its files but no database, it assumes that you’re starting from scratch, that you’re essentially doing a fresh installation. So, here’s what we’re going to do. We’re going to give this a site title which is, “Development Site”, byobrick is my username.

Rick@byobwebsite. Right now this “Development Site”, we don’t actually want to show up in Google so go ahead and unclick that so it won’t show up and hit “Install WordPress”. It says it’s intalled and we can log in. Here we are, this site has WordPress 3.2.1 on it. In terms of plugins, it shows a whole bunch of plugins because these are all the plugins that I had installed on the other site. So it shows all those plugins although none of them have been activated yet.

In terms of themes it’s going to show the Thesis Theme again because the thesis theme files are there. If you look at posts it only shows, “Hello World” and if you look at pages, it only shows “Sample Page” because we have not imported the old database. We only import the old files, and the old files created a brand new database and so that new database doesn’t have any data in it.

Step Seven – Delete Database

What we’re going to do now then is go to the next step which is, we’re going to delete this new database and we’re going to drop all those Database Tables. So we go back over to PHP MyAdmin and go to Databases and now we’re looking at “Development”. We are going to “Check All” and we’re going to drop and say, “Yes”. No tables were found in the database. If we come over here and refresh this page, we’re all the way back to our installation routine because the database is gone so it wants to recreate a new one. Which now brings us to step 8.

Step Eight – Import Database

In step eight, what we’re going to do is import the database. And again with PHP MyAdmin, we’re going to import instead of export. Come back over to Bluehost and let’s go ahead and refresh this view. Here we are at the “Development Database” and we’re going to select “Import” . We are going to choose the file, byobwebs_wrd14.sql which we downloaded today, the first of February. We open that and we say, “Go”.

What’s going to happen is it’s going to import now all of those Data Tables into this empty database if everything is working properly in this. If you look at our database now, we have all of these tables that were present in our old database.

Step Nine – Fix wp-options Table

We need to do a couple of fixes in step nine. We need to fix our wp-options Table. The reason why we have to change our wp-options table is because the one thing this database holds that will keep the site from working properly is it holds the URL of the site. So we need to go in and change the URL of the site and we have to do that in two places. So we’re going to take a look at the wp-options Table here and hit “Browse”.

Inside wp-options first is this one, so we’re going to select “Edit” and this option value will become and we say, “Go”. Then we have to find the other example of that on the second page. Here it is right here, Line 37. This is the second one that we have to change, we select edit and we just do the same thing,, I hit “Go”. Now we’ve changed them in both places and brings us to step 10 – test it, if it works, we’re going to have a German Sparkle Party.

Step Ten – Test

So, let’s test it. There you go, We can click around and go to different pages and posts and stuff like that and we can log in with the old username and password rather than the new username and password. This username and password is the same username and password as the alive site, alright?

Now we’re here and in fact, all of our plugins are actually installed. We actually have all the posts and if we go look at our Media Library, we have all of our media and if we look at our pages, we’re going to have more pages. We get to have a German Sparkle Party. We have to wait and need to bring this all the way up to one minute and six seconds. Here we go, here’s our German Sparkle Party. See, it works!

2 Comments… add one
2 comments… add one
  • Chad Barker April 10, 2014, 10:57 pm

    So when I’m done making all my changes, and I want to make the changes live, I just do the same process except copy files from development back to the main area. Is that correct?

    • Rick Anderson April 11, 2014, 9:37 am

      Chad, it depends on what’s happening on your site. If your live site has a bunch of changes on it that you want to keep – ie, posts, comments, sales, etc then NO you would need to manually transfer your changes. However, if you can simply replace everything on the live site – then YES.

      For example – I’m getting ready to make a huge change to byobwebsite. However this site changes several times an hour. So there is no snapshot of my site that is accurate for more than a few minutes. As I can’t afford to loose anything I will be making the changes manually once I have them completed on my sandbox site.

Leave a Comment