So, the solution I have come up is basically:
- Setup a dev environment on my local machines at home
- Do all my changes and test locally
- Do a database dump (or dump affected tables)
- Do a database restore on the production website
- ftp any changed files from the dev website to the production website - as Joomla stores articles, menus etc in the database you only need to do this for any CSS or PHP files that you modify plus my Photogallery.
- I manually perform any Joomla and package updates on both dev and prod.
Naturally, I expect that at some stage due to the manaul processes involved that the two may get out of sync.
I setup a local dev environment on my MAC using Joomstack as I was too lazy to do anything else.
Synching K2 articles and associated photos
Most of my articles use embedded photographs, so also need to sync JoomGallery.
Step 1 - backup in case you stuff up:
First do database dump of everything on both sites - just in case you stuff up and need to restore.
Step 2 - backup your articles and photos from prod
Using phpMyAdmin export the following tables from the prod site - this is too maintain article hits:
Make sure the "Add DROP TABLE statement" is selected. if you miss this step you will end up having a heap of duplicate entries.
Step 3 - import the tables from Step 2 to the dev site
Use phpMyAdmin to import the database backup above
Step 4 - Make your changes
Update your Articles and Photos on the dev site
Step 5 - backup your articles and photos from dev
This is the same as Step 2 except on the deve site
Step 6 - import the tables from Step 5 to the prod site
Same as Step 3
Step 7 - Synch the photos
Using Filezilla synchronise the gallery folder
- Use Rsync to do the gallery sync
- Only import new rows from the dev database to prod.
from joomla.whu3_k2_items j
left join joomla3whungee.whu3_k2_items j3
where j3.id IS NUll