The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jan 03, 2012 4:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 03, 2012 3:55 am
Posts: 5
Image
Sometimes it is nice with a little help...


To upgrade your joomla site from 1.5.0 (1.5.x) to 1.5.25...

You are told to make a test site where you can first try out the upgrade to see if it will work.

So how do you make a test site you might ask... I will try to help you out with this quick guide.




I suppose a lot of people use cPanel (WHM) on Centos so that is what I will use for this guide.



Image

Make a clone of your site.


1. Backup public_html directory

Start by logging in to your server via SSH with the root details for the server.
Navigate to the directory above public_html, usually your username:

cd home/username/

Now make a tar of public_html with the command:

tar pczf public_html.tar.gz public_html

To make it easy for yourself log in to the server via FTP and download the file public_html.tar.gz and save it on your computer.
(Leave public_html.tar.gz on the server where it was created for easy acccess later.)

You can also simply download the files via FTP without compressing them but this way you will always have the backup on server.


2. Backup Mysql database in cpanel

Log in to the cPanel for your domain and go to 'Backups' and under 'Download a MySQL Database Backup', click on your database and save it on your computer.


3. Create a new test location

The best is if you have another domain you can use a subfolder on for testing purposes. If not you can either create a subdomain in cPanel or, not recommended, use a subfolder on your current domain.
I will use a subfolder on a separate domain in this example but the procedure should be similar or same.

Login to the other domains (I will furthermore call it otherdomain.com) ftp and create a subfolder like otherdomain.com/clone and upload all the files inside public_html.tar.gz to it.


4. Adjust database for test domain

For this I suggest you use an editor like TextPad 5 that can find and replace text.

Unpack the file mydatabasename.tar.gz that you got when making the Mysql backup in step 2.
Open the .sql file in the text editor.

Find and replace ALL:

mydomain.com ->with-> otherdomain.com/clone

Find and replace ALL:

originalusername ->with-> otherdomainusername


The usernames in WHM/cPanel are usually based on the domain (Eg. happyfun.com = happyfc usually) unless you specificly changed it on creating the account. So replace originalusername and otherdomainusername above with the correct usernames. The usernames are the same as your cPanel login by the way.

Now save the file.


5. Restore database for test domain

Go to the cPanel of your test domain and create a new Mysql database. You can name it to same as the original database if you are on another domain, if not, use a new databasename.
Create a new user and add him to the database with all privileges.

Now go to cPanel -> phpMyAdmin for the test domain. Click the new database you just created in the list to the left.
Click 'Import' and on the new page browse to the database.sql you just saved in the previous step and click 'Go'. The database should now be imported.
You should now see all the tables to the left in phpmyadmin.


6. Adjust configuration.php for clone

Open configuration.php on otherdomain.com and adjust the Mysql database name, username and password to be same as the database and user you created in step 5 and save it overwriting the old configuration.php on the server.
You might also want to check so that other details are correct like ftp username and password, and login, email etc. Once its all done save and overwrite the file on server.


7. Refresh and test clone

Now go to otherdomain.com/clone and check if it is working. You should in theory be able to login to the administrator backend with the same details as on original site.



Image

Upgrade joomla

Now you have a fully working clone where you can experiment and make tests.
Try upgrading by simply overwriting all files on the test domain with the files in the correct upgrade package for your version.
You can find the upgrade packages here...
(Personally I have succefully upgraded 1.5.x, 1.5.14 and 1.5.15 to 1.5.25 with the:
Joomla_1.5.0_to_1.5.25-Stable-Patch_Package)
When it is done go to test site, check frontend and backend and examine everything carefully. If all seems well and working you know that you can make the upgrade the same way on the original site and that you have the correct package.

If something goes wrong you can simply delete the test and start over until you find the correct way ;)




I hope this guide will help you and that I didnt forget about anything.



If you experience permission problems or internal error after unpacking a folder on the server via ssh you can try these commands to restore permissions:

chown -R username:username /home/username/public_html

and then

chown username:nobody /home/username/public_html

(Change username for the domain username of course)



Please tell me if I have made any errors or if you have any questions.

Good luck!

D


Image

(All images are royalty-free clip art)


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 11:13 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Mon Aug 29, 2005 10:17 am
Posts: 11989
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
This is not very valuable since not many users have SSH access. Also if you have command line access you can do this in 5 minutes from the command line. No need for downloads when access to SSH so therefor this "guide" is coming from positive intentions but is useless for users with no SSH access and if you have SSH it makes no sense

Leo

_________________
--- Joomla Professional Support Services :: http://gws-desk.com ---
--- Joomla Professional and Specialized Hosting :: http://gws-host.com ---
--- Ready to Roll Joomla! Web Sites : 1 - 7 days only! :: @ gws-market.com ---


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 2:17 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 03, 2012 3:55 am
Posts: 5
Why would you follow the guide if you dont have ssh access? That would require another guide that we where waiting for you to make.


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 3:22 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Mon Aug 29, 2005 10:17 am
Posts: 11989
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Rather weird mate, why writing a guide that is a mixture between a 'guide' for a user with SSH access who does not need to download anything (SSH if you have the knowledge at least) or a cPanel/ftp based as you provide in your 'guide'

You post a 'guide' which is not really useful for most users and is a mixture of cPanel functionality and SSH and than you tell me to make a guide? Why should I make a guide for this where all has been described well in the documentation section of Joomla? What do I miss?

The 'guide' you write is whacked since if you have SSH you can with a couple of commands do all what you describe from the command line and no need for downloads, uploads nothing.

I can with SSH tar a user account, save, copy and restore a database on any user on the server, untar a zipped user account, move it to another account, untar it you name it....basic Unix commands and no need to download anything at all and use a wget and untar the Joomla package from Joomlacode

Say it straight forward: your guide is useless for most users and for users with SSH access the method to follow is completely different and faster. Your guide makes no sense imho

Thanks for the effort though!

Leo 8)

_________________
--- Joomla Professional Support Services :: http://gws-desk.com ---
--- Joomla Professional and Specialized Hosting :: http://gws-host.com ---
--- Ready to Roll Joomla! Web Sites : 1 - 7 days only! :: @ gws-market.com ---


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: MSN [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group