Install ee:
curl -sL rt.cx/ee | sudo bash
ee system install
nano /etc/easyengine/ee.conf
make sure these values are set:
# Custom Database Name
customdbname = true
# Custom Database User
customdbuser = true
This way when we create a new site, it will ask for our db name, user & password. We just enter these identical to our previous site.
You might also tweak other values in there such as the db prefix, admin user, password etc.
ee site create example.com --wpsubdir --wpfc
cd /var/www/example.com/htdocs/
rm -Rf *
rsync -avz --progress [email protected]:/var/www/example/* .
On the old server: export database using wp-cli: http://wp-cli.org/commands/db/export/
On the new server:
- Get the old database from the old server:
rsync -avz --progress [email protected]:/var/www/example/DBNAME.sql .
- Import the db
mysql -u USERNAME -pPASSWORD DBNAME < DBNAME.sql