We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How To: Make an ExpressionEngine test site for module and plugin testing

News and General

Scott  Torres's avatar
Scott Torres
1 posts
5 years ago
Scott  Torres's avatar Scott Torres

How to make an ExpressionEngine test site for module and plugin testing

If you currently are or planning to do module and/or plugin development work for ExpressionEngine you really should have a dedicated private test installation of EE that you can work with. While you could use your public installation it’s not a good idea. Do you really want to have your public blog throwing out errors or completely being wiped out because of a bug in the module or plugin you were working on?

This tutorial will walk you through step by step on how to setup a test installation. The ultimate goal being that once you follow these steps you’ll have a clean install of EE that you can test your modules or plugins with. The benefit of following this guide is that at any time you can do a complete rollback to the fresh installation in just seconds. Should you accidentally blow up your database or mangle the configuration all you’ll have to do is run a simple command line script and bingo it’s just like new again!

A few things to point out before we begin. First off, this should work fine for any *nix OS but I am using FreeBSD for my server. Second, you will need command line access to your server. IE you’ll need to use telnet, ssh, or be working locally. Third, this does need to be a clean, private install. The install you do should be completely separate from anything else including the use of MySQL databases and server directories. Fourth, I’m using my real world setup as the example in the tutorial just to help make it clearer. You should change the names and directories where appropriate to match your setup.

Step 1: Installing EE There really is no need to explain this. Just do a normal fresh install of EE. Create a new database and use a new directory structure separate from anything else. I created a new MySQL database and user account called “ee_test_site”. I installed EE in a separate folder “/home/abarber/public_html/ee_test_site” too. Just copy the EE image, system and user_guide folders into this new folder. IE “home/abarber/public_html/ee_test_site/images”.

Step 2: Configure and Setup the EE test site Just go through and setup the test site. Set all the admin configurations, build the templates, create a few sample members, create a few sample entries, etc. Basically, you want to have the site setup just how you want it to look and act every time you do a rollback.

This is the most crucial step! You need to have everything exactly as you want it. We’ll be making a backup of the entire installation and the rollback will totally wipe out everything and reset it to how it is from the backup.

If for example you forget to set template cacheing on but really do want it on. Every time you do a rollback you’ll have to go in and turn on template cacheing because the backup had it off!

So take a few extra minutes to thoroughly check every single thing. Yes even the directory contents. If there are files you do or do not want in the backup manage them now. It’ll make life much easier later.

Step 3: Create backup directory Someplace you should make a directory to hold and run the rollback from. I prefer to make a folder called “rollback” in my home directory. “/home/abarber/rollback”

Step 4: Make the MySQL backup We’re going to use mysqldump program to create the backup.

At the command prompt type: mysqldump -u ee_test_site -p[enter password] –add-drop-table –databases ee_test_site > /home/abarber/rollback/ee_test_site.sql

Step 5: Make the EE installation backup We’re just going to make a simple tar gziped file with the contents of the website folder. That means the actual EE files, images, etc. Remember what I said above? This is your last chance to make any changes to the files in the backup!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.