To clone a WordPress site when host provides cPanel X
CAUTION: You can mess up your existing install and or databases if you don’t know what you’re doing.
- Use Fantastico to create a new WordPress install
- Identify the new MySQL database name
- Export the old MySQL database , if cPanel then use phpMyAdmin
Hint: Check out the “Comments” table to be sure you have the right one
Hint: Be sure to check all the tables before exporting - Import the old database to the new MySQL database using phpMyAdmin
- Download the old WordPress files and folders to your local computer, perhaps using Filezilla
- Delete the files and folders in the new WordPress install, perhaps using Filezilla
- Upload the old files and folders to the new WordPress install, again perhaps using Filezilla
- If database name or user changes, edit wp-config.php to have the correct values. Filezilla will let you edit the file and then upload it back.
- Now to change the urls in the new database follow the directions here:
http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
- Basically download searchreplacedb2.php, put it in the root directory of the new install and run it
- Note: You can find the old url in the database’s posts table (use phpMyAdmin to look)
- Note: You want to swap the old url for the new url
- Note: If you can’t remember the username/password, use cPanel’s MySql Databases to create a new one and apply it to the new database.
- Note: This is why it’s kinda messy to be doing this cloning stuff — but a lot less trouble than recreating all those plugins, settings, menus, images, blah, blah