Why move ExpressionEngine?
Good question! I run a local development environment at home so that I can simulate the production environment at ICDSoft as much as possible. When I make significant changes, however, this means I have to up and move my ExpressionEngine instance from my development server to my production server.
What do I need to do before beginning?
The process is actually fairly simple. That said, always take the appropriate precautions before making any changes to a production environment, i.e. backup everything now including your existing file and the ExpressionEngine database. After that it is highly recommended that you check your backup to make sure it’s recoverable later.
Ok, I’ve backed up. Now what?
You’ve backed everything up? Good. Here are the steps I followed to move my ExpressionEngine instance from my development server to my production server.
Prepare the database
- Clear all ExpressionEngine caches. DO THIS FIRST.
- On the new server, if it doesn’t exist already, create the database ExpressionEngine will use.
- On the new server, if it doesn’t exist already, create the database user that ExpressionEngine will use to connect to your database.
- Dump the existing database to a backup file. How you do this is up to you but I personally use phpMyAdmin to backup the database to a ‘zipped’ file.
- Upload your database backup to the new database.
- Confirm that your database user can connect to the ExpressionEngine database.
Prepare the ExpressionEngine files
- Compress your existing site, probably to a ZIP file.
- Upload the archived files to your production server.
- Uncompress the archived files into the appropriate directory. Please note that most people simply FTP the files to the new server but I choose to do it this way as it’s much quicker to transfer a single ZIP archive than it is to transfer the thousands of files ExpressionEngine uses one at a time. I use a small PHP script to decompress the uploaded archive – you’ll need to make sure your host allows this before it’ll work for you. Anyway, here’s the source.
Decompress uploaded archive:
<?php echo "Unzipping ..."; system("unzip my-site-archive.zip"); echo "Done!"; ?>
Obviously you’ll have to change my-site-archive.zip to the name of your uploaded archive …
· Page 1 · Page 2·