2

Im trying use some form of source control with EE.

I cannot clearly see a way to decouple the database from the templates and other structures, as would be the case in a most CMSes. Creating channels and any specific entities seem to 100% tied to the database.

Has anyone been able to fully source control an ExpressionEngine installation and all of the application entities?

  • 1
    Please don't just come here to vent or start a flame war - the community is here to try and provide helpful solutions, not defend whether EE is an "modern CMS" or CI is a PHP5 framework. Since you're clearly already familiar with Stack Overflow, can you please rewrite your question in a more constructive manner, with details on what you have tried so far, and where specifically you are stuck? – Adrian Macneil Mar 11 '14 at 22:50
  • I'm not sure what you mean by "decouple the database from the templates" Templates can be and should be stored as files for version control purposes. Obviously the channel configuration isn't able to be version controlled in the same way, but storing db dumps in the repo has worked for many people. – Jeremy Gimbel Mar 13 '14 at 16:53
  • Is there a troll in the room ? Word press cant even do it. – stuartmcd69 Mar 14 '14 at 12:17
  • Wordpress does do this... exactly this...? post-types (entries equivalent) are declared as data structures within files, 100% source controllable. Don't get me wrong wordpress is not without flaws, although at least its able to be source controlled. – AndrewMcLagan Mar 15 '14 at 3:46
3

Can you define what you mean by "a modern CMS"? Any database driven system will face similar problems when using Git source control. This isn't specifically an ExpressionEngine problem. The only systems that wouldn't suffer this difficulty are those using flat file architecture.

I often use Git with ExpressionEngine. The only possible sticking point being, as you point out, the database.

I create a folder for database backups above my site root. Backups run either manually or by using something like BackupPro(ish) - automated via Cron. This means that the database is available in the repository.

I also use DeployHQ to deploy from the repository to the staging/production servers. The database is imported manually after deployment. This could be automated via a Bash script that runs as part of the deployment process.

There is also a wealth of useful info in this thread ExpressionEngine and GIT Process

| improve this answer | |
  • Modern CMSs are usually template driven displaying content types (entries) drawn from the database in the templates. Expression engine stores the templates in the database, this is ok with a decent syncing engine with priority given to files over database. Although EE template syncing leave so much to desire. Basically it is written on a PHP 4 framework (Codeignighter) that lack many features modern features that PHP 5+ offers. Please just take any composer based framework for a test drive and you seriously will be wondering how you coped.. – AndrewMcLagan Mar 11 '14 at 10:57
  • Also having to sync a database into a git repository makes the use of git totally almost totally redundant in the first place. – AndrewMcLagan Mar 11 '14 at 10:59
  • Clearly i have a chip on my shoulder re: expression engine. I dont come here to offend. Only vent and basically find a way around the shortcomings of this CMS. – AndrewMcLagan Mar 11 '14 at 11:00
  • 1
    ExpressionEngine can store databases as flat files. Certainly for development this is the best way to be working anyway. It will prioritise which to use based on whether the newer template exists as a file or in the database. Synching is never really a problem - indeed priority is given to files over the database. Maybe the answer to you problem is to work with ExpressionEngine as ExpressionEngine rather than trying to shoe-horn practices from other systems into your workflow? – foamcow Mar 11 '14 at 12:43
  • The framework on which a CMS (of the nature of which we are talking) is built is somewhat irrelevant unless you are developing custom add-ons or plugins. The point of EE is that you don't need to know a single thing about CI. BTW. CodeIgniter requires PHP 5.1.6. so as for being a "PHP4 Framework" - well I don't really see your point. – foamcow Mar 11 '14 at 12:43
1

You can source control all templates as you can set them to be saves as files.

The only thing you'll have an issue with is the db but show me a db driven cms for less then $10k that does that well.

There is heaps of info out there on how to run a EE site with GIT, a small bit of googling will get you there but many many of us run it in GIT very nicely indeed.

| improve this answer | |
  • Symphony CMS, Yii, Pyro CMS, October CMS, Ghost CMS... the list goes on and on and on.... They are all DB driven and template files and data structures (entries) are decoupled from the database.. – AndrewMcLagan Mar 15 '14 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.