You Need a Test Site

Big red flashing word of warning!

Be super-careful when you are following these instructions and be very sure not to edit the web server or database for your actual website!  Always be sure that you have backed up your database and web server before doing this, just in case.

You need a test site.

Creating a WordPress Test Site

Photo: © Studio Firma / Stocksy

So how do you set up a test site for your WordPress blog?  First, purchase a separate domain name (anything works) and set it up for hosting.  Then, take the following steps to copy your production site (the techie term for your user-visited website) to your test site.

If you are using VaultPress, you can use their automated restore to a new site feature. However, if you have a large number of uploads, the restore will take a bit of time.

Let’s say your production site is and your test site is

Step 1: Copy your web server
  1. FTP the following files and folders from to your computer or hard drive Note that I’m ignoring your wp-content/uploads folder, as there is really no need to upload your image library):
    • wp-admin
    • wp-content/themes
    • wp-content/plugins
    • wp-content/upgrade
    • wp-content/index.php
    • wp-includes
  2. On your computer or hard drive, delete the plugin folder for Jetpack if you have it enabled.  This is to insure that you do not confuse the WordPress stat engine when you create your test site.
  3. FTP all of the individual files that are at the same level as the wp-admin, wp-content, and wp-includes folder to your computer or hard drive.
  4. FTP all of the files from your computer or hard drive into

You’ve now made a copy of everything on your web server except your images (no need to have these on your test site).

Step 2: Copy your database

If you are using VaultPress:

  1. Navigate to your Backups.
  2. View your most recent backup.
  3. Click the Download button and select only the Database.
  4. Prepare backup and wait for VaultPress to email you with the link to your backup.
  5. You will receive a gzip file containing your database tables.

Non-VaultPress Option:

  1. Download the nifty WordPress Database Backup plugin.
  2. Go to Tools » Backup and run a backup of your entire database.

Step 3: Import your database

  1. Create a new SQL database through your web hosting company.
  2. Through your web hosting company, there should be a service called phpMyAdmin.  Log into phpMyAdmin using the username and password for your database.
  3. Select your newly-created database in phpMyAdmin and click on the “Import” tab.
  4. Browse for your backup file, be sure that the format selected is “SQL”, and click Go.
Step 4: Update your test database’s WordPress options
  1. In phpMyAdmin, click on your test database, and the table wp_options (or wp_xxxxxx_options).  BE SURE YOU ARE IN YOUR TEST DATABASE.
  2. Find the option name “siteurl”.
  3. Click the pencil on the siteurl line to edit the information.
  4. Change the siteurl to your test site.
Step 5: Update your wp-config file
  1. In FTP, navigate to the root of your TEST WordPress installation.  In our example this would be
  2. Open the file called wp-config.php
  3. Change the values for DB_NAME, DB_USER, and DB_PASSWORD to your test database information.
Step 6: Validate
  1. Visit and log into your test site.  You will log in with the same username and password as your production site.
  2. Verify that your test site is visible at

Voila!  A perfect copy of your blog.  Use your test site to edit your theme, install new plugins to play with, develop new functionality, test upgrades of WordPress or plugins, etc before applying the changes in production.

A few notes:

  • If you aren’t on WordPress, but instead have an HTML website, you should still have a test site.  Simply FTP the files from your web server to your computer, and then FTP back up to your new domain.
  • Your web hosting provider should also allow you to easily password-protect your test site’s domain.
  • You should also read the WordPress Codex articles about Restoring Your Database From Backup and phpMyAdmin.

Edited To Add: See comments below for some reasons why you need a test site – this can include changes to your WP theme, or testing out plugins and new functionality, and creating new page templates – and also a shortcut method that doesn’t involve a whole backup of your production site.

73 comments on “You Need a Test Site

  1. Brit writes...

    Great post! We have a test/production site for all of our clients when going through a redevelopment, whether they are operating on WordPress or our CMS. It makes it easy to test out changes as well so they in no way affect the live site.

  2. Ok… Once I split up my blog/site I will attempt to do this on my own. thanks for all the info!

  3. Valerie writes...

    I don’t understand why a test site is needed? Maybe it’s because I’m a beginner with this web site stuff (and your posts have already helped me SO MUCH), but this seems complicated and scary. I’ve still not figured out the FTP stuff. I have been using a Maintenance Mode plug in that throws up a temporary splash page while I’m editing and making sure stuff works and then I deactivate Maintenance Mode and voila, my site is good to go.

    • Ami writes...

      Hi Valerie! The maintenance mode plugin is a good idea – although if you want to work on changing your theme, or activating new plugins and making sure they work with your existing site, creating new page templates, etc, and don’t want downtime, a test site is really necessary.

      A lot of the coding that I do is longer than a few minutes, it may take weeks or even months to get things perfect.

      And yep – it’s quite a bit scary! If you don’t want a perfect backup of your site you can simply install your version of WordPress on a test domain. You won’t have your posts, etc to work with but it is useful for css changes.

      Also, let me know if you have specific FTP questions and I’ll be glad to answer them!

  4. Brit writes...

    Ami – in setting up my own test site, I’m unable to edit the wp-config.php file correctly – I get an error. Any tips on how to do that?

    Thanks muchas!

  5. Brit writes...

    Nevermind! I just figured it out! :)

    • Ami writes...

      Great Brit! If there is anything that you found I should add to the instructions to make things clearer just let me know!

  6. gamboa writes...

    Like your post.
    is local server(XAMPP) test site not enough as a test site? I dont have a test site as I dont want to spend extra money for that. :)

  7. Kurt writes...

    I used the db backup plugin and it created the file as a .gz file. When I try to import it says “You attempted to load file with unsupported compression (application/gzip). Either support for it is not implemented or disabled by your configuration.” I can’t find anywhere to enable that. Any ideas?

    • Ami writes...

      hi kurt!

      your web host might have disabled gzip importing. In your Import screen, do you see “Imported file compression will be automatically detected from: none, gzip”?

  8. Jessica Lee writes...

    Hi Ami,

    First of all, thank you so much for sharing good info! I’m a beginner and just started learning how to create/maintain a self-hosted WordPress blog less than 2 weeks ago. Your detailed articles have been a lot of help! Thank you again.

    I’m stuck at #2 just like Kurt. I use GoDaddy for web hosting. I get the same exact error message when I try to import the .gzip file. In my import screen, I see “imported file compression will be automatically detected from: None, zip” (it doesn’t say “…detected from: none, gzip”).

    Here’s the link for the screenshot of my import page:

    I found this from GoDaddy forum that’s supposed to help me solve this problem:

    However, the article is just full of codes with no instructions that can be easily understood by beginners like myself.

    I would really appreciate it if you could help me with this.

    • Ami writes...

      Hi Jessica, that article from GoDaddy is for dedicated servers, my guess is, as a beginner, that you have shared hosting, which means you don’t have control over your server and can’t do what it’s asking you to do. My advice would be to contact GoDaddy and tell them that you have a large gzip backup file to upload – I’m sure they can help!

      Good luck! Warmly, Ami

  9. Yuri writes...

    Absolutely a brilliant way to create a mirror image of your production website. It would be great if there was a plug-in that would automatically merge the test website updates, content and info with the production version of the website. That would be a tough one to create. Thanks for the great info! Keep it up and super-kudos to your blog.

    • Megan Brain writes...

      Try wpclone but it works differently to this method

  10. Adam writes...

    Hi Ami –
    This is a really helpful post, thanks for walking through everything here. I do have a question related to the install of the test site, and maybe I’m missing something…when I finish the install and login to the backend, all looks right, but then when I go to the main page, all of the links and everything link back to their original entries on my production site. And when I try to create new pages in the backend of my test site, the root URL directs them to my production site as well. Any idea why?



    • Adam writes...

      Nevermind – I figured it out, just a simple settings change in the WordPress dashboard on the test site. Just FYI (maybe others have run into this problem), WordPress automatically set my website URL to the production site, so under the settings tab, I had to change it to the test site…thanks again!

  11. Jose writes...


    Just a quick comment to say that you just followed the exact same steps that I took.
    I, obviously, agree with your method though I have a couple of comments:
    – Not a real backup: I wouldn’t consider this a real backup solution since the DB you create for the demo site is independent of the production site DB and won’t get updated every time there is new content. As a matter of fact I’d love to hear suggestions on how to keep the demo DB updated automatically grabbing the latest content.
    – Subdomains: I’m using a subdomain ( so I don’t need to buy a new domain for my client

    Kind regards,


    • Ami writes...

      hi jose! yep, subdomains work, although i prefer, just for privacy reasons, to have a segregated domain.

      and if you find out anything on updating the demo db automatically, let me know. i haven’t ever heard of that being done successfully. also, i wasn’t saying it was a long-term backup solution, just a simple backup for the test site so you can code appropriately.

      thanks for chiming in!!

  12. lee kaplan writes...

    Our site is getting out of control and I am about to create a test site. Thank you very much for the help about making one. My question is, and I realize that it is a silly question… How do I upload any changes to my site when I am finished on the test site?

    • Ami writes...

      hi lee – not a silly question. you would just ftp the relevant theme files up to your production site from your test site.

      good luck!

  13. Cassie writes...

    First of all, thank you SO much for making this tutorial. I searched far and wide for one that was easy to follow and this was it! I got though everything without a hitch (well almost).

    I’ve finished all the steps, but when now when I view my test site, it shows the theme/outside content of my blog, but none of the posts or widgets. Any help would be greatly appreciated!

    Live :
    Test :
    Username : test1234 Password : 6bgzd8y8pq

    • Cassie writes...

      Nevermind! Figured it out myself.
      An extra step that I had to do at the end of this was go to the Admin Panel for my test site Settings > General and change the “Site Address (URL)” field to the URL of my test site.


      • Ami writes...

        yes that is in step 3, you might have missed that in the huuuuuge set of steps! :) i’m so glad it worked for you!

  14. thomas cocuzza writes...

    This is a very helpful article. Having a test site is a must. We have been following this type of setup for years. The one thing that might be helpful is to mention you could use as a test site. This can save a little bit of money. Also, be sure to have no index, no follow so you don’t get crawled on the test site.

  15. Laura writes...

    Hi Ami – I’ve been looking for instructions like this for awhile and had pretty much given up. Thanks so much for posting! I tried it out and it works. I did also have to change the DB_HOST name in the wp-config to get it running.

    I went ahead and transferred my images folder since I only have 1 post up. I have a couple of drafts posts in there as well. The images in the published post show up, but the drafts don’t (images or text). Any idea why that might be?

    • Ami writes...

      hi laura! you are super welcome. :) interesting that the drafts aren’t showing up. i actually haven’t encountered that at all. my test site had pending review, draft, and published posts and all showed up. do you see the drafts in the posts -> edit screen?

  16. Kelly writes...

    Hello – love this posting, and just performed the steps. Went well and test site looks go, but I am getting this message in the dashboard:
    “Upload folder is not writable. Export and file upload features will not be functional.”
    I read the wordpress codex, and made sure the upload folder and contents have a 755 permission. Still didn’t solve the problem; one of my plugins is also complaining that uploads is not writable.
    I checked the original site, and it has the same permissions of 755 on the uploads folder and contents.
    Any idea why one would get this error after an otherwise smooth process?
    Again – thanks for the excellent and helpful tutorial!

    • Ami writes...

      hi kelly! for the regular upload error, try going into settings -> permalinks and just hitting save. sometimes that resets things. and for the plugin one, some plugins require absolute server path, go to the settings for that plugin and see if there is a full path there that might need changing.

      hope that helps and thanks for the kind words!

      • Kelly writes...

        Thanks for the reply to my comment (that was fast too!). I tried what you suggested, and resaved the permalinks setting. That didn’t solve the problem, but I thought it might be on the right track so I visited each of the settings links and resaved them. Then I noticed something that might be relevant…

        In the Settings->Media section, there is an “Uploading Files” section with a field labeled “Store uploads to this folder”. In this field it had the following value:


        It dawned on me that the original site I copied from had references to “xannbr” (this was a user name I think at the time WP was installed by Softaculous), and the new site has a slightly different value of “xannb1”. So, I changed the value from “xannbr” to “xannbr1” – so the field now reads:


        This solved the problem! I’m not sure if this is something I caused by not following your very well-written directions carefully, or if it is unique to my site or host (shared hosting with

        Anyway, thanks again for the great guide and your fast and helpful feedback. I hope this info helps others who may run into the same issue.


  17. Marc writes...

    Wow, this is definitely the most detailed step by step guide I ran across for how to build a test site. And I followed all the links for FTP, Database Backup, What is WP, etc and all the articles were awesome. This beat out all the support forum comments on
    Thank you, thank you thank you! I’m hoping to have my site up before the end of the summer!
    Please keep posting this great content!

  18. GiGi writes...

    Thanks for the instructions. Unfortunately, I must have done SOMETHING wrong.
    I’m getting just a directory listing on my test site. I AM able to log-in by clicking on the
    wp-login.php link on the directory listing, but here is one of the error messages I’m getting once I’m logged in:

    array_keys() [function.array-keys]: The first argument should be an array in /home/gkideas/public_html/ on line 519

    So none of the themes are present and none of the plug-ins are there (even though they are on the ftp server listing)

    Does that error message help with troubleshooting the problem?


    • Ami writes...

      hi gigi! it sounds like there was an issue in copying over your wp-admin and wp-includes files. try perhaps re-copying those and hopefully that helps. unfortunately i’ve never seen that specific error before, so sorry!

  19. Kelly writes...

    Once again, thanks for the great guide. I have run into a small issue and wonmdered if I missed something or you had a suggestion.

    My production site is “”; my test site is “”. I *only* copy FROM production to TEST, never from TEST to PRODUCTION. However, I notice on my test site (.net) that my embedded images in posts etc. point to the image on my production (.com) site.

    Is there an easy way to replace all of my “” references on the copy of everything at my test “”?

    Thanks again!

    • Ami writes...

      hi kelly! you are welcome. what you are seeing is normal, because your links and images are located on the .com, they are still linked there in the .net. you would have to move over all of the images and do a bulk SQL update in your database to change these, but it really shouldn’t be necessary and you are probably using your test site for functionality and theme changes. hope that helps!

  20. Allison writes...

    I followed all the directions to the letter, but my mirror site is completely blank. Nothing I does changes that. :-/ While I can log in to WordPress and fiddle around with things in preview, and all my files seem to be there, both in the ftp and in WordPress all I see at is blank (not even an error message). Thoughts?

  21. Allison writes...

    Egad! Spoke too soon. It turns out the only theme was broken. Adding a new theme fixed it. Thanks, and sorry!

  22. dave writes...

    Hi Ami…I found that under “settings” the wordpress url is my test site but the other url right underneath it is the production site url – and BOTH are greyed out so that I cannot change the url. I did change the url in phpmyadmin (wp_options) to the test site url.

  23. dave writes...

    Thanks for your help on this Ami. Very much appreciated. What I did was change BOTH the SITE url and the HOME url in the wp_options table in phpMyAdmin – that particular table in my case goes on for several pages so you may have to click at the bottom where it says “page number” to advance to the next page or so until you come to the option_name “HOME” url (which will also show the production site’s url after importing the production site’s database).

    The WordPress address (URL) and the Site (what I call the “home”) address (URL) are still greyed out in the General Settings of your WordPress blog after making this change as I’ve described, but at least both url’s are for the TEST site (before, the WordPress URL was for the test site and the Site (or “home”) URL was for the production site.

    Also, a good explanation of this problem and other possible solutions are at: (including, Changing the URL directly in the database section)

  24. Chris writes...

    I didn’t find this in this posting, but is there a way to do this and add/modify content on the testing site without affecting the original site? Like my client wants to modify wording on the home page or in a post or even add a post without it being added to the “live site.” Or does this configuration do this?

    Great posting by the way!

  25. Chris writes...

    Also, I didn’t see it in your instructions above, but I’m assuming we are supposed to copy the root of the WordPress live site as well as those 3 directories. Otherwise we wouldn’t be able to edit the wp-config.php file. Am I correct?

  26. Chris writes...

    Chiming in again – Firstly – it works like a charm. I’ve been looking for this for quite some time. Thank you so much for posting this!

    I found that #3 you state to copy all of the files that are at the same level of those directories. I think it might be more straight forward to say in step #1 something like: “FTP ALL of the contents (files) of your live-site’s WordPress installation (root files and directories).” But then again, maybe I just confused myself. So sorry for my previous post (which you can delete if you want).

    And I confirmed that editing content on the test site doesn’t affect content on the live site.

    Just what I needed. Thanks again and sorry for so many posts. ;-D

  27. Nancy writes...

    Love your blog! Especially this post. I followed all the directions exactly, but I’m having a problem:

    1. the /testsite/wp-admin page seems to be separated from the main domain and working correctly (my testsite is a subdomain)

    2. returns to main website when I click on the blog title from inside the /testsite/wp-admin dashboard

    3. get a 404 error when I try to access /testsite though

    I’ve been looking for a “how-to” on this topic for a long time. Yours is the absolute best! I’m SOOO close! Thanks for any help you can offer.

    • Ami writes...

      FYI Nancy wrote back and said: “I found the problem. I had to go to /testsite/wp-admin then settings menu – general link and manually add the subdomain to the site address”

      So if you have a subdomain – there’s the way! :)

  28. Chris writes...

    Perhaps you could give us the links to your site and test site (/testsite) so we can see what’s happening?

  29. Kelly writes...

    OK, this is really strange. I have been regularly using this article to make test sites from my main site. I completed blow away the test site, delete databases etc. Then, I follow the procedures here exactly, with the addition of two small items mentioned in the comments: I edit the site URL on the WP Dashboard GENERAL settings, and I edit the upload folder path in the MEDIA tab (these two settings are copied over from the old site and still reference the old site).

    Suddenly, when I create a new test site, it seems after the first day to stop displaying all of the post and page contents. They are still there (I can edit them, and I see posts and images), but only the title, date, author appear. Everything else that should be there is, such as menus & widgets – it just won’t display the contents of pages and posts aside from the titles.

    One other person has previously commented above that this has happened to them, but no solution has been posted. Any ideas? Maybe something in WP 3.2.1 changed? What I really don’t understand is why the pages/posts show when first copied over, and some time later (next day?) the content stops displaying…

    help! (and Thanks!)

    • Ami writes...

      Kelly that is so strange! I honestly haven’t tried this since WP 3.2.1 but it shouldn’t be an issue, especially if you see the items when you first transfer things over.

      A couple initial thoughts:

      Can you try deactivating your plugins to see if something is odd there? Then reactivate one by one.

      Is there caching involved with some kind of mod_rewrite on your htaccess file?

  30. Kelly writes...

    Hi Ami – thanks for the reply! Well, I have disabled a bunch of the plugins, but since this is a copy of the production site, it is only using the plugins the production site has. I don’t have any caching at all. I had not yet made any changes to anything (such as testing plugin upgrades, etc). BTW, both test and production sites are with the same hosting provider, but are each on their own shared account.

    The only thing I have done recently is enabled the alternate cron in order to get BackupBuddy to work: define(‘ALTERNATE_WP_CRON’, true). I noticed that on the day I created the latest fresh copy of the test site, I noticed something I don’t think I’ve seen yet on a WP site. There is a suffix on the site URL that ended in something like ‘?doing_cron’. Now, I know the cron jobs run for various things, such as scheduled postings, but I don’t ever remember seeing this in the URL. I have enabled the alternate cron on my production site as well, and have not experienced the problem there.

    I have not modified .htaccess, nor done anything unusual with mod_rewrite (other than knowing that it is enabled and that I can do custom/pretty permalinks).

    So I’m just trying to figure out what could cause WP to not display any page or post contents, even though they exist just fine in the database. When I look at the page source of the blog page, I can see code displaying the date, author name, category but there just isn’t any code even attempting to display content.

    Any other thoughts? Could this be a database issue?

    Thanks again -= Kelly

  31. Kelly writes...

    OK – it turns out that even though I had tested plugins to see if they were causing the problem with my test site’s pages & posts not displaying their content, the problem WAS a plugin.

    The plugin was Fleapay ( version .3. What is odd is that the problem doesn’t necessarily show up immediately after activating the plugin. I think there is something that happens, possibly when the cron runs, that triggers the problem. Once the problem has been triggered, if you deactivate and then activate the plugin it will immediately cause the problem. This scenario made it a little hard to isolate.

    the company that makes this plugin is extremely responsive, and in about an hour after I reported it to them, they duplicated the problem and released a fix. Fleapay v 0.4 contains the fix.

    Thanks Ami for your responsiveness and help with this issue!

  32. Kim Pomares writes...

    Hi, Ami and Thanks for the post AND for the responses you give.

    I hope you can help me too.

    I want to setup a new site from the current site, change themes, plugins, add new content. Then I want to replace the current site with the new site.

    Your instructions make it easy to create the new site, but I am afraid to do the “replacing” part on my own. Have you done this before?

    • Ami writes...

      Hi Kim – for the theme and plugins it’s just as simple as FTPing them up to your production site and activating. For the new content, I would just go the manual route and add the posts manually into your prod site after activating the new theme and plugins. Hope it helps!

  33. kayla writes...

    Hi, I have been following your directions, and have tried numerous times, by creating a sub folder – BETA on my FTP server, and copying the files there.
    For some reason, whenever I try and login to the BETA site I cannot log on with my main site’s user name and password and it just bounces me back to the log in page.

    When I then try and log on to the regular site (no subdomain) I get forwarded to the BETA site- to stop this from happening I deleted the BETA subfolder. Any ideas how to get this to work?

    • Ami writes...

      Hi Kayla – did you do step 3 and 4? If so, it might be because it’s in a sub-folder – I have never tried that before and recommend either a whole separate server or at least a whole separate domain. Hope that helps!

  34. Les writes...

    You have neglected to update all post urls in table wp_posts so you will not be able to navigate teh site and will get page not found on the homepage.

    UPDATE wp_posts SET guid = REPLACE (

    UPDATE wp_posts SET post_content = REPLACE (

  35. forest writes...

    I followed the steps and have a functional sub-site with database. However, WordPress does not allow me to log-in. Any tips on how to fix this? Thanks

  36. Anders writes...

    Extremely helpful. Thank you so much.

  37. Kelly | Blushink writes...

    So I’m commenting here, but I’m not sure if this will get to you. I’ve done all the steps but I’m at the point where I need to import my backup to my new database. When I do so, it generates and error “#1062 – Duplicate entry ‘31147’ for key ‘PRIMARY” and only the _comments and _commentsmeta tables copy the remaining don’t.

    I created a sub domain. so I wonder if this could be the cause.
    Thank you!

    • Ami writes...

      Hi Kelly! Sounds like a problem in creating the new SQL database, as the “primary key” is part of each DB table. I would blow the database away and start again and see if that works?

  38. Armando Diaz writes...

    Excellent post!

    Just an “oh by the way”
    I set up a MySQL server and an Apache server with phpMyAdmin on my laptop.
    Then I use Adobe Dream weaver to manage the “pulling” of files from a production server to a local directory on my laptop. I make my changes on my local files then “put” them to my test server which happens to be on the same laptop.

    I test the changes on the testing site (my laptop) then when I’m satisfied I “put” the file from my test server to the production machine(s).

    All that was required was to Export the production database, FTP the back=up file to my laptop, import it to my test server database, change the site URL in the test database, modify the wp-config.php file and ad an entry into my local windows “host.” file to point to my local Apache test site(s) and viola!

    Test server(s) – on my laptop gratis!

    For those who are tech savvy, you can set-up sub domains on you hosting account where you can showcase “work in progress web sites” to potential new clients and Vhosts locally to set up multiple test/development sites on that same laptop.

    One of these days I’ll post the steps to setting this up. My point; you can host your own test site(s) on your trusty laptop.


    • Samson writes...

      @Armando, what you describe is exactly what I’m looking to do. I’m a techie but new to website design, wordpress, and all theme stuff. I’m creating a simple site for my wife to sell some items online. I already installed the theme and started working on the contents when I realized that I need to be doing this on a test/dev stage before deploying to the production site. I plan to implement what you describe in your comment and host the test site on my laptop. I have access to dreamweaver. Please get me some step by step instructions – if you can – to get me started. Thanks in advance.

  39. Mike writes...

    Excellent Post-

    Ami- I have searched and tried for weeks to find a way to mirror my site for testing updates, etc. By far I have had the most success with yours.
    My minor issue…

    I used a subdomain for my testing site and I can access WP panel, etc. ; however when I look at the content of all my pages I created , they are blank yet when you http to the test site they show up ??

    Thanks for any help you can offer

  40. Mike writes...

    Ok- I “lied”, chrome was caching my previous attempt at a test site. The content is there when I http to it but it looks very little like my production site :-(


    • Ami writes...

      Hi Mike – did you move all of your themes over?

  41. Armando Diaz writes...

    Mike – don’t forget to import you MySQL production database into your test site.

    • Mike writes...

      Ami and Armando- Thanks for the response. I reinstalled my genesis/executive (child) theme but it didn’t help. I ran plugin Update URL to search and replace the references from production site to my test site.
      I also followed Ami’s db instructions and uploaded my production db to the test database I created on the subdomain.
      There is content on the test site but the formating is wrong.
      I did copy over the plugins and unsure if that helps/hurts as I want to have a true test copy to work with.

      I am ‘at a loss’ what to do…

      I’ve tride WampServer locally (it wouldn’t start) and prefer a web based test offering.

      So close but still missing the target.



  42. Armando Diaz writes...

    Well Mike we need to use the “process of elimination’ to solve this. We know that your test server is working and serving pages. Check.
    we know that you have re-created the exact same theme, widgets & plug-ins. Check.
    we know that you imported the production database to the test server. Check
    So what do we have left?

    The only answer that comes to mind is that one or more of your php pages have been altered. OR.. maybe it’s just the CSS file that is different.

    Here’s what I would do, FTP to the production server and bring the ENTIRE site down to your test server. Then modify the wp=config.php file to point to your test server by changing; DB_NAME, DB_USER & DB_PASSWORD variables respectively.

    Here’s my reasoning; I suspect that while you recreated your production environment in your test server. This is different from a ‘RESTORE’. Treat your test server as you would your production server after a hard drive crash.

    Recovering from a disaster would include installing your HTTP server. You’ve got that covered. You’ll have to install your SQL server. You’ve got that covered.
    You’ll have to install WordPress. You’ve got that covered.
    You’ll have to install the same theme that you had in production, including all plug-ins and widgets. You’ve got that covered.
    You’ll have to restore the production SQL database. You’ve got that covered.

    So the only thing left is a difference in one or more files in your theme. Number one suspect is the CSS file but just to be safe I would ‘RESTORE’ everything! that mean bringing an exact copy of my production files to my test server.

    If that doesn’t work I would verify SQL and PHP versions between both. if they are not the same, make sure your test server’s versions are the same or higher.

    If that doesn’t work. I would probably wipe the drive and begin anew from scratch, but hey, that’s just me. After enough frustration I lose interest in why it doesn’t work and focus on what I know WILL work. Especially if I’m billing the client by the hour. :)

    This and $5.00 will get you a Venti Grande at Starbucks!

  43. Mike writes...

    Armando- thank-you for your lengthy reply. I ended up :
    1. copying public_html/…. to my local drive.
    2. copy /public_html/… to test subdomain
    3. change the 3 entries in wp-config.php
    4. Somehow it worked with a few minor challenges
    a. My menu bar disappeared.
    b. background color changed.
    c. contact7 form didn’t work.

    5. Otherwise the pointers are correct and the above were easy to fix.

    Thanks for your help and to Ami.


  44. Armando Diaz writes...

    You’re very welcome.
    Now you can recover from a disaster should one arise l

    Dont forget to always run back ups!!!!!!!!!!!!!!

  45. Teslav writes...

    Thanks, everything works however on the home page when I click on a post it takes me back to my original site

Leave a Comment

Your email address will not be published. Required fields are marked *