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

Upgrading EE 2.x from an earlier version. Database update only. Deployment strategy.

Development and Programming

Elliot Lewis's avatar
Elliot Lewis
49 posts
13 years ago
Elliot Lewis's avatar Elliot Lewis

I’ve tried to be specific in the title!

This is a general approach question but specifically I’m updating a site from EE 2.1.3 to EE 2.5.0.

I had a functioning local copy of the site at 2.1.3. I’ve run through all the EE and third party updates and so the local version is now 2.5 and working well. I’ve got a development server running 2.1.3, so again an exact copy of the live site.

I’m ready to try and upgrade the development site as I will the live site. A test environment.

All my local files just need copying to the development server, but the development database will be out of sync. So I only need run the database updates that occurred from 2.1.3 to 2.5.0.

Is there a way to do this? I’m assuming just the files in: system/installer/updates/

If not what will happen if I just copy the installer directory to the dev server and run the updates as normal? I know at the very least during the update process EE alters the ‘app_version’ config array in config.php. Ideally I don’t want any files updated just the database tables.

NB All files are in version control, so I’d just like to deploy and then run a database update.

       
Dan Decker's avatar
Dan Decker
7,338 posts
13 years ago
Dan Decker's avatar Dan Decker

Hi Elliot Lewis,

Hrm, while a bit outside our scope here, you are on the right track.

Since you are in VCS, deploy your local, new, 2.5 files to your development server. That will get the updated files there just the same as they would have going through the “Standard” update process.

Once the new versions are deployed, simply copy the installer up to the server.

Very important! Make sure the version of /system/expressionengine/config/config.php on the dev server remains untouched (do not deploy you local version of this file) until you run the installer. Otherwise the installer will not run.

You are correct that the installer simply runs the schema updates for new ExpressionEngine versions.

Is there anything else I can assist you with?

Cheers,

       
Elliot Lewis's avatar
Elliot Lewis
49 posts
13 years ago
Elliot Lewis's avatar Elliot Lewis

I meant to refresh this a couple of days back. After writing the post, as I had everything in a very easy way to roll back I thought why not give it a go!

So I deployed all files and then uploaded the installer folder, then ran it. It did no updates and just skipped to complete.

So I thought I’d just try altering the version number in the config file that matched the database version and the installer seemed to run with no hitches. All the databases tables updated as necessary. Easy to check, in my instance the password field went from 40 to 128 characters.

From then on I just had to alter any addon’s where I’d changed settings as these are stored in the DB. So far everything seems prefect.

So at the point of going live, this should be a down time of a few minutes rather than hour(s) updating the live site.

It would be interesting to know of other devs methods for achieving this.

Thanks for your input Dan, good to know it is possible.

       
Dan Decker's avatar
Dan Decker
7,338 posts
13 years ago
Dan Decker's avatar Dan Decker

Hi Elliot,

It sounds as though everything went rather smoothly for you! That’s awesome.

It would be interesting to know of other devs methods for achieving this.

If you’d like, I can move this over into Development and Programming to keep the discussion going?

Cheers,

       
Elliot Lewis's avatar
Elliot Lewis
49 posts
13 years ago
Elliot Lewis's avatar Elliot Lewis

That would be great. Local, Dev and Staging environments must be the norm for professional web agencies. It would be great to find out how everyone else is managing this.

       
Shane Eckert's avatar
Shane Eckert
7,174 posts
13 years ago
Shane Eckert's avatar Shane Eckert

Hey Elliot,

I am glad to see that Dan has been able to provide some guidance on your issue!

I will move this on over to Dev and Programming.

Happy coding,

       

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.