Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to test some plugins on my Wordpress site. However, I do not want to mess anything up. Is there a way to duplicate my Wordpress site to a new directory so that I can test plugins there before I push them to the main site?

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

I sometimes use this plugin

http://wordpress.org/extend/plugins/duplicator/

it works pretty well if your server enviroment meets it's requirements.

Otherwise, it's the good ole, mysql dump route that the other guys explained.

share|improve this answer
add comment

You can do this a few different ways. If you are using a hosted server:

  1. Download your FTP files for your site.
  2. Go to PHP MyAdmin and export your Database
  3. Create a sub-folder for your additional WordPress installation and place the downloaded files in it. (Make sure you remove the wp-config.php or replace the details with the new database you'll create (next step).
  4. Create a new database for the the new installation you exported earlier
  5. In the new sub folder you created, rename the wp-config-sample.php to wp-config.php
  6. Open your browser and type in the URL of your site including the name of the subfolder you are using for the new installation and place /wp-admin at the end of the URL (http://www.yoursite.com/subfolder-name/wp-admin).
  7. Follow the on-screen steps (be sure you have the new DB Name and Username for the DB you created earlier
  8. Once you have the installation complete go back to PHP My Admin and import the DB you exported earlier. (you may get an error saying the tables already exist). If you do get this error, you can open the .sql file and remove everything from the comment that says "Dumping data for table wp_comments" to the top of page and save the file, then import it.
  9. You should now be able to go to the site and activate plug-ins and check that everything is in order.
share|improve this answer
add comment

Another Method would be to use WAMP (assuming your using a PC). For this method follow these instructions:

  1. Navigate to http://www.wampserver.com/en/ and download the latest version.
  2. Install WAMP on your PC
  3. Download WordPress and place everything inside of the wordpress folder in the following location: C:\wamp\www\yoursitename---WORDPRESS FILES HERE----.
  4. Open WAMP and make sure it's connected to Localhost (when you click on the WAMP icon to start it, you should see an icon in your system tray, if it's connected the icon will turn green.
  5. Click on the green icon I spoke of in the last step. When clicked it will pop up some options, you need to click on the top options that says PHPmyAdmin. You will then click import and import the .sql file you exported from the original site.
  6. Now in your browser go to : http://localhost/the-folder-name-you-placed-wp-files-in-goes-here/wp-admin
  7. Once you have completed the WP installation, you can replace the WP-Contents with the wp-content folder of your current site so the plug-ins, themes etc. match your live site.
  8. Go to your new WP site and enable plug-ins etc.

The only thing that might be an issue for you if you choose this method would be that some things may function a little different on your localhost rather than a web hosted site. There are things you can do to improve the local hosted WP like enabling permalink structure. There are plenty of helpful articles if you get hung up along the way, or you can post any questions here and I'll try to help you out.

Good Luck.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.