TUTORIAL: How to upgrade from one version of Gantry to another
35 views
Skip to first unread message
Luke Douglas
unread,
Nov 25, 2016, 9:19:00 AM11/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gantry Framework for Joomla Users
Here is how I upgrade a site to Gantry 5 (as well as to previous versions) and it works very well.
Within the website control panel (I use cPanel), in the file manager, create a folder called 'newdesign'.
Select all of the 'public_html' root folders and files (except for the 'newdesign'
folder) and copy them into the 'public_html/newdesign' folder.
Copy your current database (I use PHPAdmin) to a new database.
Create a new user with a new password.
Assign the new user to the new database with 'all rights' (yea, I know...you can bypass some permissions but I'm lazy).
Edit the 'configuration.php' file in the 'newdesign' folder to change the following fields:
public $user = 'NEW-USER-NAME';
public $password = 'NEW-USER-PASSWORD';
public $db = 'NEW-DATABASE-NAME';
At this point, you have now created a complete duplicate website which will NOT affect your current live website files/folders or database. Viewers can still use the current site without any interruption.
Go to the new development site by browsing to http://DOMAINNAME/newdesign/administrator/index.php link and login with your superuser credentials.
The
first step to take is to go into the Global Configuration settings and
set the site 'Offline' as well as set the 'Robots' to 'No index, No
follow'. You don't want anyone to view the development site except for
administrators and super-users as well as you do not want search engines
to index any pages (probably not necessary since the site is offline
but I don't take any chances).
Install Gantry and your selected Gantry Template which you make as the default template.
Go into the website file manager, navigation to http://DOMAINNAME/newdesign/templates/TEMPLATE-FOLDER/custom and create a 'scss' subfolder.
Inside the new 'scss' subfolder, create a new custom.scss (NOT CSS) file.
This is the file where you will make all website custom style changes.
In your template settings, you can go click the 'Extras' down-arrow (top right area) and
enable the 'Development' setting so you won't have to re-compile your
custom changes while working on the website. Otherwise, if this setting
is disabled, you will have to re-compile the style changes under the
'Style' tab in order to see the website with the new style changes.
If
you have multiple screens, you can open your current website in one
screen and your new development site in another screen so you can
compare your changes to the development site to your current site. I
have three screens which really speeds up my development time. :)
Once
you have the new development site ready to go live, you can swap out
the two sites. As this will bring the site down for 3-4 minutes, maybe
shorter..maybe longer depending on the number of files that you have,
you might want to do this late at night or very early in the morning.
Before
proceeding, go back to your Global Configuration, set the development
site back to online and set the Robots setting back to 'Index, Follow'.
FYI, there should be no reason to add any redirects in your HTACCESS
file if you have not changed any of your content alias settings.
In your root 'public_html' folder, create a folder called 'original'.
Select
all files in your 'public_html' folder except for the 'newdesign' and
'original' subfolders. Copy the selected files to your
'public_html/original' folder. Your root 'public_html' folder should be
empty except for the two subfolders.
Navigate into your 'public_html/newdesign' folder, select all files and copy to your 'public_html' folder.
At
this point, the new design should be live and you can proceed with
normal website updates using your original administrator page links
(without the 'newdesign/' subfolder).
I've used this process about 200 times over the past 5+ years and it has worked very well for me.