How do I clone my Wordpress site to a development site?

This is easy do do if you know your way around FTP and phpMyAdmin.  If this starts to go over your head, don't worry, we can do this for you for a fee of $29.95.

First of all, you need to make sure you have a dev site set up on your VPS. Log in to, and navigate to VPSs > Manage > Websites.  Scroll down to the section "Websites hosted on this VPS".  If you see one called "", you already have a dev site. If you don't see one, just click the "Add a new website or subdomain" button to create it.

If you already have a dev site, you'll need to FTP in and make sure the folder is empty before proceeding.

See this FAQ for instructions on creating FTP or SSH users:

Copying the files

The first step is to get your website files copied over. You'll need to copy the entire contents of /home/domains/ to /home/domains/ If you're using FTP, you'll do this by downloading the contents of docs to your computer, and re-uploading them into If you're a command line (SSH) user, you can simply run this command:

cd /home/domains/; cp * ../ or rsync -avW /home/domains/ /home/domains/

Copying the database

Again, refer to this FAQ for instructions on logging in to your phpMyAdmin:

Next, refer to this FAQ for instructions on creating a new user / database pair on your SmartVPS:

Once that's done, you'll navigate to the existing live database, and click the Export button to download an .sql file. Then, you'll navigate to the new dev database you just created, click the Import button, and import the .sql file into the new database.

For SSH users, you can do this quickly and easily like so:

mysql -e "CREATE DATABASE mywordpresssite_dev"
mysql -e "GRANT ALL PRIVILEGES ON mywordpresssite_dev.* TO mywordpresssite_dev@localhost IDENTIFIED BY 'ENTER-A-NEW-PASSWORD-HERE'"
mysql mywordpresssite_dev < /home/db_dumps/LIVE_DATABASE_NAME.sql

We create a backup of your site files and databases every morning, so a very recent copy of the live database will already exist in /home/db_dumps. If you need a fresher copy, just mysqldump databasename > databasename.sql to grab it.

You'll need to know your Wordpress database name, user name and password of course. This info can be found in the wp-config.php file you copied over in the first step.

Updating the permalinks

  • Login to Wordpess:
  • Click -> Settings -> General.
  • Change both the Wordpress address and Site Address to read:
  • Click Save Changes.
  • Click Permalinks.
  • Click Save Changes (yes, you don't actually change anything on the Permalinks page, you only click Save Changes.)
  • Done.
Tags: clone, copy, dev, development

You cannot comment on this entry