Using Git When Updating or Making Changes To Joomla Live Sites

General questions relating to Joomla! 3.x. Please consider the availability of third-party templates and extensions when deciding which Joomla version to use.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
maestroc
Joomla! Explorer
Joomla! Explorer
Posts: 363
Joined: Sun Dec 04, 2005 7:27 pm
Contact:

Using Git When Updating or Making Changes To Joomla Live Sites

Post by maestroc » Wed Jul 18, 2018 7:21 pm

I'm trying to wrap my head around how I could use Git with Joomla to make my edits to a live site more painless. I am posting this here rather than at a Git oriented site because when I have tried the responses don't seem to comprehend the bigger question. Be aware that other than the idea of it I know almost nothing about Git. I've read the page in the Joomla docs about it:

https://docs.joomla.org/Working_with_git_and_github

but honestly it hasn't helped me much. I still don't really understand how it might be helpful in the kind of situation detailed below.

Normally when making minor changes on my live site I will just run a backup, make the changes, and in most cases life goes on. In some cases though I want to see the changes before it goes live which involves me making a copy of the site files in a subfolder or in a new account, making a new database, and then once all the changes are done removing the old site, copying back the newer version, updating the database, etc. This becomes a huge problem when the site is still live and accepting comments, submissions, registrations, etc. Unless I shut down the site while I am updating I run into having to merge all that new data.

Since cpanel now comes with Git installed and available for all users, how could using it help me when making changes to a site without having to do all that extra copy/move/etc. stuff? Does git take care of the database as well?

If I sound like I don't have a clue on this one you are correct so any advice or instructions would be greatly appreciated...

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35547
Joined: Sat Apr 05, 2008 9:58 pm

Re: Using Git When Updating or Making Changes To Joomla Live Sites

Post by Webdongle » Wed Jul 18, 2018 8:00 pm

If changes are to Articles only ... use j2xml
If the changes are to the Template only ... then copy the Template files.
If changes are new 3rd party extensions ... then test them on a copy and install on the live site.
Otherwise (without cherry picking database tables) you lose comments that were added to the live site.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11722
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Using Git When Updating or Making Changes To Joomla Live Sites

Post by brian » Wed Jul 18, 2018 8:57 pm

The "problem" with using git for a joomla website in the way that you describe is that git doesn't handle anything in the database. git is for files only.

The document you referred to in the docs site is relevant for testing changes and devloping code and not content which lives in the database
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 331
Joined: Mon Nov 12, 2012 9:08 am

Re: Using Git When Updating or Making Changes To Joomla Live Sites

Post by jonBuckner1 » Sun Jul 29, 2018 1:39 pm

I was looking in to this but like Brian stated, you can not use git on the database, bummer!


Post Reply

Return to “General Questions/New to Joomla! 3.x”