WordPress Cloning Script

I made a script that seems to be able to clone wordpress sites on cpanel based servers pretty well. More work needs to be done, like it won’t work for various plugins like caching ones, but it does copy the site files, clone the database and replaces the site name in the database.

cd /scripts/
wget kb.zeusandhera.com/wp-clone.sh
chmod +x wp-clone.sh
/scripts/wp-clone.sh

Then after you run it follow the prompts on the screen.  You can also run “/scripts/wp-cloner.sh –help” and it will give you some more details on how to speed up the process as well. Let me know if you have any issues!

————————————————————————————-

root@host [~]# /scripts/wp-clone.sh –help

Usage: /scripts/wp-clone.sh [-h –help] [arg1] [arg2] [arg3]

-h| –help Displays this help information
arg1| This should be the source WordPress Directory
arg2| This should be the destination WordPress Directory
(what the source will be cloned to)
arg3| Enter the destination URL (don’t include www)

Description: This script will help clone a wordpress site either within a cpanel account or across different cpanel accounts. Just give the source and destination directories as arguments, if they aren’t given they will be prompted for. The file path will be created if it doesn’t exist, but any addon/subdomain would still need to be created and pointed to a directory within cpanel.

Script can also generate mysql information and register (map) the database and username so it shows up in cpanel.

If you don’t want the database information automatically generated then create a mysql database, username, and password in cpanel and then make sure to give the user full permissions to that database.