Skip to content

Instantly share code, notes, and snippets.

@aristath
Created April 17, 2014 09:27
Show Gist options
  • Save aristath/10968274 to your computer and use it in GitHub Desktop.
Save aristath/10968274 to your computer and use it in GitHub Desktop.
Migrate from a stand-alone WordPress site to an easyengine server.

BASIC SETUP

Install ee:

curl -sL rt.cx/ee | sudo bash
ee system install

CHANGE CONFIGURATION

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.

CREATE SITE

ee site create example.com --wpsubdir --wpfc

COPY WEBROOT FROM OLD SITE

cd /var/www/example.com/htdocs/
rm -Rf *
rsync -avz --progress root@192.241.240.170:/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 root@192.241.240.170:/var/www/example/DBNAME.sql .
  • Import the db
mysql -u USERNAME -pPASSWORD DBNAME < DBNAME.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment