SlideShare a Scribd company logo
Deployment
with ExpressionEngine
@BostonEErs
November 16, 2010
Roadmap
1. Vanilla Migration - Step by Step
2. Making Deployment Easier - Tools and
Methods
3. Alternative Deployment
Methods
The Two Faces of EE
The Database The Files
- Could be locally hosted, already on
the server, or on another server.
- Contains most data that is fed into
ExpressionEngine.
- Locally hosted or on another server.
- Contains ExpressionEngine plus any
addons and their themes.
- Contains templates (if you are saving
templates as files).
- Contains hard-coded EE config files.
The Players
The Database
Staging Server
Local Environment
Production Server
Mystery Element??
Your Setup
Staging Server? No staging server?
One developer or a team of developers?
What your setup is depends on your organizational needs, your
client's needs, and what is overkill.
Beforehand
Have an EE migration checklist handy.
Make sure the new server can handle ExpressionEngine.
Make sure you have enough time (no meetings in 15 minutes).
Make sure you have a backup plan if it hits the fan.
Migrating Step by
Step
Step 1: Backup
Back up the files and the database.
Don't not do this.
Step 2: Sync Templates
This is very easy to do on EE2.1
EE Templates
Is the template saved
as a file?
Yes
Notes
Get all data for the template out
of the database.
Step 2: Sync Templates
No native tool in EE1.x
Alternatives: Manual, third-party solutions.
DC Template Manager (Free)
"Saves the content of the template files (saved in the file-system) back to
the database."
http://devot-ee.com/add-ons/dc-template-manager/
Step 3: Export DB
Take note of Database collation. Changing the DB collation might break your
site entirely.
Database Collations
Notes
"Set of rules for comparing characters in a character set".
Defines the relationship of the character encoding to the actual
characters.
Default is latin1_swedish_ci, because the developers of MySQL
are Swedish.
Collations are needed for MySQL to perform logic - such as
ordering rows by strings in columns in different languages.
ExpressionEngine will, by default, create databases with utf8
character sets and utf8_general_ci collations.
Step 4: Create a New Database
Only necessary if moving databases.
Import SQL file and verify that collation is the same.
Step 5: Migrate File System
Don't delete existing data on the server.
Use an archive (tar or zip) if your host allows it.
& Set Permissions
Confirm and set file permissions as necessary.
File Permissions
/system/expressionengine/config/config.php
/system/expressionengine/config/database.php
666 (or equivalent)
/system/expressionengine/cache/
/images/avatars/uploads/
/images/captchas/
/images/member_photos/
/images/pm_attachments/
/images/signature_attachments/
/images/uploads/
777 (or equivalent)
Set applicable permissions for your template directory.
Check to see if add-ons have file permission needs.
Don't forget ALL the file's need correct permissions.
File Permissions
/path.php
/system/config.php
/system/config_bak.php
666 (or equivalent)
/images/avatars/uploads/
/images/captchas/
/images/member_photos/
/images/pm_attachments/
/images/signature_attachments/
/images/uploads/
/system/cache/
777 (or equivalent)
Step 6: Update Hardcoded Configs
Update configs in the file system for the database and basic
configs.
/system/expressionengine/config/database.php
/system/expressionengine/config/config.php
You can update the config.php values
in the Admin > System Administration
> Config Editor in EE2.
/system/config.php
/path.php
Step 7: Change Path Variables
EE likes to keep the server path in different places. You'll need to update
those.
Find your server path using the Tools > Utilities > PHP Info tool.
Your server path should be the _SERVER['DOMAIN_PATH']
variable.
Step 8: Update Additional Paths
Look for paths in JS, CSS, add-on paths, etc.
Remember hard-coded paths in templates. You can batch-remove these
with search and replace in EE2.
Step 9: Verify You Can Sync Templates
Use the EE2 Sync tool to make sure that you can synchronize your EE2
templates.
All your template data in the database should be up to date at this point in
the move, and you can re-create the directory if there are read/write issues.
Step 10: Clear Your Cache
Just do it. For fun.
Step 11: Verify Your .htaccess
.htaccess files tend to get lost in moves. You may need to re-create it or
modify it for a different server setup.
Step 11: Load Your Site
It either works or it doesn't or something in-between.
Contingency Plans
Put up old site and start steps from #1.
If you can access the CP, turn off the site and start searching on the
forums.
Check file permissions for files in general.
Turn on debugging index.php for PHP errors (EE2) or set error_reporting to
'E_ALL' in index.php (EE1)
Making Deployment
Easier
Cool Tools You Gotta Use If You
Wanna Stay in School
DC Template Manager
"...DC Template Manager offers a
convenient way of moving the
contents of many templates between
the database and the filesystem
simultaneously."
Free
http://devot-ee.com/add-ons/dc-template-manager/
Deeploy Helper
"...collects many of the configuration
parameters we most frequently
modify on one page, where power
users can modify them all at once
with search and replace."
$9
http://devot-ee.com/add-ons/deeploy-helper/
Reelocate
"ExpressionEngine stores your website URL and
Server Path in a ridiculous number of places.
REElocate helps you update these in one simple
step."
Free
http://devot-ee.com/add-ons/reelocate/
EE Deployment Accessory
List (with links where applicable) and helpful resources.
Available at on the GEM blog www.greeneggmedia.com/blog
Sparrow
"Sparrow is the ultimate deployment tool. Its premise is simple:
make deployment insanely easy. It's powerful, flexible, and brilliantly
clever. It tracks your site's changes and pushes them out to servers.
It works perfectly with version control systems. It's the best solution
to this problem. Want to find out more? Visit http://getsparkplugs.
com/sparrow/ to register your interest."
- Jamie Rumbelow
Making Deployment
Easier
Methods
Erskine Design's Modified EE
Setup
Talk from EECI2010 on modifying
ExpressionEngine 1 for efficiency.
config.php loads different config file based
on server IP.
Takes advantage of EE's hard-coded
configuration option.
Code available at:
http://eeinsider.com/blog/eeci-2010-how-erskine-
rolls-with-ee/
EE Config Handling
Notes
system/core.prefs.php handles preferences.
Preferences stored in database in serialized arrays.
Core Prefs saves config.php data, reads the preferences out of the
database, and then overwrites those with config.php items if available.
Config.php's $conf array can be populated with any viable config and it will
override the database version. Config.php can also be extended over
several files provided the $conf array is present, which is what Erskine is
doing.
Configs are in expressionengine/config/config.php in a $config array.
Preferences stored in database using base64 encoding.
EE_Config saves config.php data, reads the preferences out of the
database, and then overwrites those with config.php items if available.
Config.php's $config array can be populated with any viable config and it
will override the database version. Config.php can also be extended in the
same way as EE1.
EE Config Handling
Notes
Alternative Deployment
Methods
Partial Deployment
Not every deployment includes the entire site.
Example: Making updates on a local environment and updating those on
the live site.
Methods include live development on hidden pages, manual uploading, and
versioning.
Using Git with EE
Git is a versioning system that keeps track of changes to files.
Git can be used to collaboratively work on EE sites (mainly using template
and theme files).
Can be set up to ignore EE files you never alter.
If you have SSH access to your server, you can deploy with Git commands
or automatically with Capistrano or with a paid solution like Beanstalk
Caveat: does not track database changes. (Channels, entries, etc.)
Ryan Masuga gave a fantastic talk
at EECI2010 EuroWorld which can
be found at:
http://gititon.masugadesign.com/
"Goal is to not edit anything in the
CP, ever"
The elephant in the room is the
database. No clear solution at this
point.
Resources, links, and more stuff can be found at:
http://www.greeneggmedia.com/deployment

More Related Content

PDF
Oracle api gateway installation as cluster and single node
PDF
Mid term & final- preparation- student-review(Oracle)
PPT
APACHE
PPT
]project-open[ Package Manager
TXT
Install
PDF
Ebs clone r12.2.4
DOCX
Spring review_for Semester II of Year 4
Oracle api gateway installation as cluster and single node
Mid term & final- preparation- student-review(Oracle)
APACHE
]project-open[ Package Manager
Install
Ebs clone r12.2.4
Spring review_for Semester II of Year 4

What's hot (20)

TXT
Formats
ODP
Website releases made easy with the PEAR installer, OSCON 2009
PDF
WP HTTP API
TXT
CHANGELOG.txt
PDF
Apache - Quick reference guide
ODP
Website releases made easy with the PEAR installer - Barcelona 2008
PPT
香港六合彩
PDF
Installing AtoM with Ansible
PDF
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
PPTX
PHP presentation - Com 585
PPT
Apache
PDF
$ make install
PPT
Less18 moving data
PDF
Installing php and my sql locally using xampp
KEY
Php Power Tools
PPT
Apache Presentation
PDF
Team lab install_en
PPT
Linux Webserver Installation Command and GUI.ppt
PPT
PHPExcel and OPENXML4J
Formats
Website releases made easy with the PEAR installer, OSCON 2009
WP HTTP API
CHANGELOG.txt
Apache - Quick reference guide
Website releases made easy with the PEAR installer - Barcelona 2008
香港六合彩
Installing AtoM with Ansible
WordPress Theme & Plugin development best practices - phpXperts seminar 2011
PHP presentation - Com 585
Apache
$ make install
Less18 moving data
Installing php and my sql locally using xampp
Php Power Tools
Apache Presentation
Team lab install_en
Linux Webserver Installation Command and GUI.ppt
PHPExcel and OPENXML4J
Ad

Viewers also liked (14)

PDF
Search Engines for Machine Learning: Presented by Joe Blue, MapR
PDF
ScottMadden's 51st State Roadmap
PPT
Basf roadmap-2-global-st852
PDF
Where are we now: IPv6 deployment update - Brunei National IPv6 Day Conference
PDF
A Roadmap to Improving a BPO Program
PPT
Keys To Successful Governance with SOA
PDF
BASF - Sustainable Operations and Environmental Impact at the Largest Chemica...
PDF
Reliability roadmap using quality function deployment
PPT
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
PPTX
Everything you need to know about SQL Server 2016
PDF
Aria 1.0 roadmap
PDF
VMware End-User-Computing Best Practices Poster
PPTX
Startup Roadmap Workshop
PDF
Creating your Company's Roadmap to SharePoint Success
Search Engines for Machine Learning: Presented by Joe Blue, MapR
ScottMadden's 51st State Roadmap
Basf roadmap-2-global-st852
Where are we now: IPv6 deployment update - Brunei National IPv6 Day Conference
A Roadmap to Improving a BPO Program
Keys To Successful Governance with SOA
BASF - Sustainable Operations and Environmental Impact at the Largest Chemica...
Reliability roadmap using quality function deployment
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Everything you need to know about SQL Server 2016
Aria 1.0 roadmap
VMware End-User-Computing Best Practices Poster
Startup Roadmap Workshop
Creating your Company's Roadmap to SharePoint Success
Ad

Similar to Deployment with ExpressionEngine (20)

PDF
Getting started-with-zend-framework
PDF
17398351 sap-system-copy-homcopyv1
PPTX
Asp .net folders and web.config
PPTX
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
PPTX
Tech Ed Africa Demystifying Backup Restore In Share Point 2007
PDF
OroCRM Partner Technical Training: September 2015
PPTX
[DanNotes] XPages - Beyound the Basics
PPTX
Automated Deployment
PPTX
PHP North-East - Automated Deployment
PDF
White Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
PPT
XPages -Beyond the Basics
PPTX
O porque das minhas aplicações funcionarem... E o que acontece com os recurso...
PPT
Extension Library - Viagra for XPages
PPTX
Asp .net folders and web.config
PDF
A Complete Installation Guide for Orangescrum
PPT
Migraine Drupal - syncing your staging and live sites
PPTX
Drupal 8 Configuration Management
PDF
Lab 1 Essay
PPT
Edubooktraining
Getting started-with-zend-framework
17398351 sap-system-copy-homcopyv1
Asp .net folders and web.config
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Tech Ed Africa Demystifying Backup Restore In Share Point 2007
OroCRM Partner Technical Training: September 2015
[DanNotes] XPages - Beyound the Basics
Automated Deployment
PHP North-East - Automated Deployment
White Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
XPages -Beyond the Basics
O porque das minhas aplicações funcionarem... E o que acontece com os recurso...
Extension Library - Viagra for XPages
Asp .net folders and web.config
A Complete Installation Guide for Orangescrum
Migraine Drupal - syncing your staging and live sites
Drupal 8 Configuration Management
Lab 1 Essay
Edubooktraining

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Deployment with ExpressionEngine

  • 2. Roadmap 1. Vanilla Migration - Step by Step 2. Making Deployment Easier - Tools and Methods 3. Alternative Deployment Methods
  • 3. The Two Faces of EE The Database The Files - Could be locally hosted, already on the server, or on another server. - Contains most data that is fed into ExpressionEngine. - Locally hosted or on another server. - Contains ExpressionEngine plus any addons and their themes. - Contains templates (if you are saving templates as files). - Contains hard-coded EE config files.
  • 4. The Players The Database Staging Server Local Environment Production Server Mystery Element??
  • 5. Your Setup Staging Server? No staging server? One developer or a team of developers? What your setup is depends on your organizational needs, your client's needs, and what is overkill.
  • 6. Beforehand Have an EE migration checklist handy. Make sure the new server can handle ExpressionEngine. Make sure you have enough time (no meetings in 15 minutes). Make sure you have a backup plan if it hits the fan.
  • 8. Step 1: Backup Back up the files and the database. Don't not do this.
  • 9. Step 2: Sync Templates This is very easy to do on EE2.1
  • 10. EE Templates Is the template saved as a file? Yes Notes Get all data for the template out of the database.
  • 11. Step 2: Sync Templates No native tool in EE1.x Alternatives: Manual, third-party solutions. DC Template Manager (Free) "Saves the content of the template files (saved in the file-system) back to the database." http://devot-ee.com/add-ons/dc-template-manager/
  • 12. Step 3: Export DB Take note of Database collation. Changing the DB collation might break your site entirely.
  • 13. Database Collations Notes "Set of rules for comparing characters in a character set". Defines the relationship of the character encoding to the actual characters. Default is latin1_swedish_ci, because the developers of MySQL are Swedish. Collations are needed for MySQL to perform logic - such as ordering rows by strings in columns in different languages. ExpressionEngine will, by default, create databases with utf8 character sets and utf8_general_ci collations.
  • 14. Step 4: Create a New Database Only necessary if moving databases. Import SQL file and verify that collation is the same.
  • 15. Step 5: Migrate File System Don't delete existing data on the server. Use an archive (tar or zip) if your host allows it. & Set Permissions Confirm and set file permissions as necessary.
  • 16. File Permissions /system/expressionengine/config/config.php /system/expressionengine/config/database.php 666 (or equivalent) /system/expressionengine/cache/ /images/avatars/uploads/ /images/captchas/ /images/member_photos/ /images/pm_attachments/ /images/signature_attachments/ /images/uploads/ 777 (or equivalent) Set applicable permissions for your template directory. Check to see if add-ons have file permission needs. Don't forget ALL the file's need correct permissions.
  • 17. File Permissions /path.php /system/config.php /system/config_bak.php 666 (or equivalent) /images/avatars/uploads/ /images/captchas/ /images/member_photos/ /images/pm_attachments/ /images/signature_attachments/ /images/uploads/ /system/cache/ 777 (or equivalent)
  • 18. Step 6: Update Hardcoded Configs Update configs in the file system for the database and basic configs. /system/expressionengine/config/database.php /system/expressionengine/config/config.php You can update the config.php values in the Admin > System Administration > Config Editor in EE2. /system/config.php /path.php
  • 19. Step 7: Change Path Variables EE likes to keep the server path in different places. You'll need to update those. Find your server path using the Tools > Utilities > PHP Info tool. Your server path should be the _SERVER['DOMAIN_PATH'] variable.
  • 20. Step 8: Update Additional Paths Look for paths in JS, CSS, add-on paths, etc. Remember hard-coded paths in templates. You can batch-remove these with search and replace in EE2.
  • 21. Step 9: Verify You Can Sync Templates Use the EE2 Sync tool to make sure that you can synchronize your EE2 templates. All your template data in the database should be up to date at this point in the move, and you can re-create the directory if there are read/write issues.
  • 22. Step 10: Clear Your Cache Just do it. For fun. Step 11: Verify Your .htaccess .htaccess files tend to get lost in moves. You may need to re-create it or modify it for a different server setup.
  • 23. Step 11: Load Your Site It either works or it doesn't or something in-between.
  • 24. Contingency Plans Put up old site and start steps from #1. If you can access the CP, turn off the site and start searching on the forums. Check file permissions for files in general. Turn on debugging index.php for PHP errors (EE2) or set error_reporting to 'E_ALL' in index.php (EE1)
  • 25. Making Deployment Easier Cool Tools You Gotta Use If You Wanna Stay in School
  • 26. DC Template Manager "...DC Template Manager offers a convenient way of moving the contents of many templates between the database and the filesystem simultaneously." Free http://devot-ee.com/add-ons/dc-template-manager/
  • 27. Deeploy Helper "...collects many of the configuration parameters we most frequently modify on one page, where power users can modify them all at once with search and replace." $9 http://devot-ee.com/add-ons/deeploy-helper/
  • 28. Reelocate "ExpressionEngine stores your website URL and Server Path in a ridiculous number of places. REElocate helps you update these in one simple step." Free http://devot-ee.com/add-ons/reelocate/
  • 29. EE Deployment Accessory List (with links where applicable) and helpful resources. Available at on the GEM blog www.greeneggmedia.com/blog
  • 30. Sparrow "Sparrow is the ultimate deployment tool. Its premise is simple: make deployment insanely easy. It's powerful, flexible, and brilliantly clever. It tracks your site's changes and pushes them out to servers. It works perfectly with version control systems. It's the best solution to this problem. Want to find out more? Visit http://getsparkplugs. com/sparrow/ to register your interest." - Jamie Rumbelow
  • 32. Erskine Design's Modified EE Setup Talk from EECI2010 on modifying ExpressionEngine 1 for efficiency. config.php loads different config file based on server IP. Takes advantage of EE's hard-coded configuration option. Code available at: http://eeinsider.com/blog/eeci-2010-how-erskine- rolls-with-ee/
  • 33. EE Config Handling Notes system/core.prefs.php handles preferences. Preferences stored in database in serialized arrays. Core Prefs saves config.php data, reads the preferences out of the database, and then overwrites those with config.php items if available. Config.php's $conf array can be populated with any viable config and it will override the database version. Config.php can also be extended over several files provided the $conf array is present, which is what Erskine is doing.
  • 34. Configs are in expressionengine/config/config.php in a $config array. Preferences stored in database using base64 encoding. EE_Config saves config.php data, reads the preferences out of the database, and then overwrites those with config.php items if available. Config.php's $config array can be populated with any viable config and it will override the database version. Config.php can also be extended in the same way as EE1. EE Config Handling Notes
  • 36. Partial Deployment Not every deployment includes the entire site. Example: Making updates on a local environment and updating those on the live site. Methods include live development on hidden pages, manual uploading, and versioning.
  • 37. Using Git with EE Git is a versioning system that keeps track of changes to files. Git can be used to collaboratively work on EE sites (mainly using template and theme files). Can be set up to ignore EE files you never alter. If you have SSH access to your server, you can deploy with Git commands or automatically with Capistrano or with a paid solution like Beanstalk Caveat: does not track database changes. (Channels, entries, etc.)
  • 38. Ryan Masuga gave a fantastic talk at EECI2010 EuroWorld which can be found at: http://gititon.masugadesign.com/ "Goal is to not edit anything in the CP, ever" The elephant in the room is the database. No clear solution at this point.
  • 39. Resources, links, and more stuff can be found at: http://www.greeneggmedia.com/deployment