How to Move Your Joomla! 1.5 Site to a New Server
Written by Cory |
February 08, 2009
|
(33)
The most popular article on this site covers How to move your Joomla! site to a new server, but it does not cover all of the details for moving your Joomla! 1.5 site to a new server. This how-to discusses the process of moving your Joomla! 1.5 site to a new server. The information contained in this how-to also happens to be an excerpt from my upcoming book, Beginning Joomla!. (Due out in early April)
Step 1: Check server settings
Compare the server settings of your current host to the settings on the new host to make sure that your new server is compatible with Joomla! and the extensions you have already installed.
Step 2: Back up everything
This includes all Joomla! files, third-party component files, and any other files that you have added to your site such as images, videos, and so on. Create a folder on your local system, and download all files to that folder using your FTP client application. As I mentioned in my first article about moving your Joomla! 1.0 site, FileZilla is the FTP client I prefer to use, but you could really use any FTP client.
Step 3: Export your database
The third thing you need to do is export your Joomla! database. The best thing to do is to export it into an SQL file, which makes importing it easier in a later step. The SQL file will contain all of the necessary SQL commands for creating your database tables and filling them with your data. Be sure you export the entire database.
Using phpMyAdmin on both servers makes this step easier, because it offers the ability export your entire database to an SQL file. It also makes importing your files easier in step 6.
Step 4: Modify configuration.php
Note: Pay close attention to this step, because this is where the process differs the most from moving your Joomla! 1.0 site.
Every Joomla! installation has a configuration file in its root directory called configuration.php. This file stores basic configuration information that Joomla! uses throughout the system. Most of the parameters in the file will stay the same, but some will change due to the different settings on the two servers:
- $host - This value is the database host. In most cases, this will be "localhost," but if you are using a different server for your database, you will need to change this.
- $user - This is the database user. Change this if it is different from the user on your other server.
- $password - This is the database user's password.
- $db - This is the database name.
- $ftp_host - In most cases, the FTP host will be "127.0.0.1," but if you are using a different setting you will change it here.
- $ftp_port - In most cases, the FTP port will be "21," but if your server uses a different port you will change it here.
- $ftp_user - This is your FTP username.
- $ftp_pass - This is your FTP password.
- $ftp_root - This is the root path to which your FTP user has access.
- $tmp_path - This is the absolute path to the tmp directory on your server. It will probably look something like "/path/to/joomla/installation/tmp."
- $log_path - This is the absolute path to the logs directory on your server. It will probably look something like "/path/to/joomla/installation/logs."
- $offset - This is the time zone offset for your server. For example, if your company is in one time zone, but your server is in a time zone two hours ahead, you will need to see this to "-2."
- $live_site - This parameter is optional. You can probably leave it blank, but if you use it, this is the URL of your site. It will probably look something like "http://www.example.com" or "http://www.example.com/joomla."
- $sendmail - This is the path to the sendmail program on your server. If you are not using sendmail, you can ignore this.
- $smtpuser - This is the username for your SMTP server. If you are not using your SMTP server for sending e-mails from your site, you can ignore this.
- $smtppass - This is the password for your SMTP server. If you are not using your SMTP server for sending e-mails from your site, you can ignore this.
- $smtphost - This is the host name or IP address for your SMTP server. If you are not using your SMTP server for sending e-mails from your site, you can ignore this.
Step 5: Upload all of your files to the other server
Using an FTP client application (like FileZilla), upload all of your files to the location on your new server where you want to install Joomla!.
Step 6: Import your database to the new MySQL database
Using phpMyAdmin (or console commands if you are an advanced database administrator) and the SQL file you generated in step 3, import your old database into your new database.
Step 7: Test your new installation
Your move should now be complete, but please don't take my word for it. Test your site to make sure that everything is in its proper place and working the way you expect it to. For example, if you did not use relative URLs for your links on your old server, they may not work properly on your new server.
Questions/Comments?
As always, questions and comments are welcome. I hope you found this how-to useful. Good luck!
Trackback(0)
Comments (33)
written by Noor Hammad, March 24, 2009
Just a quick question: If my original database is called for instance "localhost" and I want it to be called "newwebsite" on my new server am I able to import "localhost" straight to "newwebsite" or should I set up a database called "localhost" on the new server and then change its name once the migration is done?
Sorry for the wordy question. Once again thanks for a helpful article.
written by sdedhia, April 07, 2009
Thank you for your post.
I needed to migrate a site from the prod server to a test machine as I inherited the maintenance of this site. I followed your instructions to do the migration. However I get the following errors:
*) The site comes up. But it is not formatted correctly
*) When I try a search, I get 404 error
*) I cannot log into the administration section. I get the following error: "Fatal error: Call to undefined method JException::getTableFields() in /var/www/temp.ppmrn.net/plugins/authentication/phpbb3.php on line 82"
Can you help me troubleshoot.
Thanks,
Sonal
written by Nigel Aves, April 29, 2009
If I turn off the password in MySQL (and delete the password line in .conf) then everything works OK.
Any advice would be well received.
Nigel Aves
written by Natasa, May 04, 2009
I needed to migrate joomla site from my home wamp server to the same one at my work place.I followed your instructions to do the migration. Everything went fine with the files and database migration and configuration.php changes, but however I cannot log into the administration section. I get the blank screen
((
written by Najeeb, May 08, 2009
What is a QuickStart package?
1. What is exactly a QuickStart Installation provided on your template and how do i install it?
The QuickStart package included all the files needed to install joomla J!1.5 lastest stable version, our template, components, modules and plugins, also the sql dump content included to set the template exactly like we show on the demo showcase.
QuickStart = Joomla J1.5 + gk template + components, modules and plugins + sql demo content.
How to install?
Just create a new database, unpack and upload all the files available inside of the quickstart folder to your joomla website. Them make a normal joomla installation and login into your administrator panel using "admin" as username and "demo" as password.
written by Wes, June 04, 2009
Wes
written by lobo_tuerto, July 08, 2009
I took the liberty to do a translation of this article to the Spanish language.
Credit is given, hope it doesn't bother you.
http://lobotuerto.com/blog/2009/07/07/como-mover-un-sitio-joomla-1-5-de-un-servidor-a-otro/
written by zarana, July 11, 2009
written by Bibbi, July 16, 2009
I have previously uploaded a site with no problems.
Can anyone tell me what is wrong and how I solve the problem?
Thanks.
Bibbi
written by reshma, July 20, 2009
written by Lost Lion, July 24, 2009
Although you clearly said "import your old database into your new database" I didn't realize that I needed to create a database on the new server before uploading the sql file. (I thought that the sql file WAS the database, and not just its contents). Once I figured that out, moving the site was a breeze.
written by adamto, August 10, 2009
Thanks for great instructions! I moved whole joomla in few minutes (+download and upload of files).
written by Lee White, August 14, 2009
written by Lee White, August 14, 2009
written by John, August 26, 2009
I loved the article. The two sites above I tried it with and had mixed results. On my first attempt everything went smooth and then I had a duplicate site at superioryouth.com and featurewinner.info. (these two domains are test domains for me. I use featurewinner.info to build sites, then move them to superioryouth.com for testing and then finally to a client's site when going live. I have plans for these two domains down the road but that's immaterial to what's happening here.) I used Dreamweaver to build sites in the past but thought I'd give Joomla a try.
After building the site at featurewinner.info, I moved the site to superioryouth.com to test the things in this article. Everything worked fine with a couple of minor issues (or at least I thought).
The problem is I went into superioryouth.com and changed a few things like the Front Page welcome and removed the footer, etc. What I thought was great turned out horrible in that even though I made the changes on superioryouth.com the changes were also made to featurewinner.info and, essentially, I had duplicate websites and I was horrified. Changes in featurewinner.info were also made to superioryouth.com. Hence utter confusion, etc. I tried manipulating the global settings in superioryouth.com and then broke it's link to the database and, therefore, I need to copy the site over again to superioryouth.com. Any ideas what went wrong and why changes are being duplicated in both places. I should add that I'm a reseller of hosting and, therefore, I have several accounts on my hosting service with similar home directories and I'm wondering if that has something to do with it. All ideas are welcome. Thanks in advance for your help.
written by Nigel S Aves, August 26, 2009
It sounds like you are sharing the same SQL database on both sites. (Are they on the same server?)
If the answer is yes then you need to copy the SQL database to a new name and then edit the configuration and change the database name in there.
That should give you two independant and unlinked sites.
written by John, August 26, 2009
When I rename the database and user name in the Joomla control panel, under the Servers option, when I rename either the user or the database, I get the following error: "Database Error: Unable to connect to the database:Could not connect to MySQL"
When I exported the database from the first site, that worked fine and when I went to the next site to import it, I received an error that the user was not on the database. Even creating the user in phpMyAdmin didn't help when I went to import it. Next, I created the database with a different name in phpMyAdmin and then only exported the tables from the first site and imported the tables into the new site. After that, it seems to have worked but it was still pointing to the first database apparently because changes in either site were affecting both sites exactly the same.
After importing the database and getting into second site fine, then I went to change the database name and user name and that's when the error occurred that I posted previously in this post.
Any ideas as to what I'm missing here? Is there a specific order to work this through. I'm in urgent need of direction on this.
Thanks in advance everyone and sorry for the lengthy description of the problem.
written by reuelc, August 30, 2009
i have a problem however when i change the values in the configaration.php... im getting this error:
jtablesession::Store Failed
DB function failed with error number 1146
Table 'scuelloc_jo152.joom_session' doesn't exist SQL=INSERT INTO `joom_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id
` ) VALUES ...
when i revert back to the old db user and password the site is ok.. but when i put the imported db im getting this error. i checked in phpmyadmin i think the database is ok.
any help would be appreciated. thanks
written by reuelc, August 30, 2009
written by reuelc, August 30, 2009
written by veronique, September 12, 2009
I followed all the steps
1-click database restore says everything worked
BUT when I check webhost phpmyadmin the database is empty (0)
written by veronique, September 12, 2009
when i type my website dommain name i have
Tex of
sitejoomla
when I click on sitejoomla
I have
Database Error: Unable to connect to the database:Could not connect to MySQL
DO YOU THINK THAT IT IS DUE TO MY TWO DATABASES FOR ONE SINGLE WEBSITE?
It would mean that it is not a problem in local but it becomes a problem in remote?
written by Rob, November 12, 2009
written by Robert, November 16, 2009
I wanted to ask one thing about the Joomla database. I had a site (Joomla 1.0) a few years. When expired our hosting package, we took a new one (this month). Before that we save all that was found on the FTP, all our files, but we didn't save our dabasase (step 3) (via MyPHPAdmin because we didn't know) and now when we hung our new hosting site via FTP with all uur data files there is no site only an database error. Would it be somehow to return to be like the old site?
I know that we should preserve the old database (step 3) (via the MyPHPAdmin for example) but we didn't know that and is it all over for our old website or is there a solution for that?
Thanks in advance and all the best!
written by Jose Picon, November 17, 2009
What would be the cause of this problem?
Thanks!
written by Jose Picon, November 19, 2009
Try to contact your older hosting provider support service in order to ask them for a backup of your Joomla database. If you don't have access to that account it could be the only way to recover it. If you can't have access just try the support request with them.
Have good luck! Bye,
JPicon
written by Susan Zakar, December 01, 2009
Thanks for the step-by-step!
written by Carl Diaz, December 10, 2009
First off I Activated Mysql on yahoo and installed into www.domain.com/phpMyAdmin (its not specified where to install this so I place in its own folder) Is this a mistake? Does this affect my next step?
here goes the steps from site:
1. Created a Subdomain -Folder name - www.domian.com/Sub - (refer to question above. should this be install under the phpMyAdmin folder since that is where i install Mysql?)
2. Copied all the files in the Crogram Filesxampphtdocsjoomla15 folder to 'Sub' folder via Filezilla
3.Log into phpMyAdmin (local) and EXPORT to my_export.sql
4.Log into phpMyAdmin (host - yahoo) import my_export.sql
Ok everything looks fine so far.....
5. here is where I sort of lost it
My changes:
var $log_path = '/var/www/vhost/domainname.com/Sub/log';
var $tmp_path = '/var/www/vhost/domainname.com/Sub/tmp';
var $live_site = 'http://www.Sub.domainname.com';
/* Database Settings */
var $dbtype = 'mysql'; (this was already set)
var $host = 'mysql'; (I search yahoo and it says the host is mysql)
var $user = 'admin'; (is this username my host yahoo or the local - I assume yahoo)
var $password = 'password'; (is this pw my host yahoo or the local - I assume yahoo)
var $db = 'mysql'; (again yahoo db name mysql)
var $dbprefix = 'jos_';
Example:
var $log_path = '/var/www/vhost/domain.com/subdirectory/html/logs';
var $tmp_path = '/var/www/vhost/domain.com/subdirectory/html/tmp';
var $live_site = '';
var $host = 'name your remote host';
var $user = 'your_user_db_name';
var $db = 'your_db_name';
var $password = 'your_db_password';
RESULTS:
jtablesession::Store Failed
DB function failed with error number 1146
Table 'mysql.jos_session' doesn't exist SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id
` ) VALUES ( '5c3dea9a99ad460af6d7f4ca8787efb6','1260415479','','0',
'1','0' )
Can someone please please point me in the right direction.
Thanks,
Carl
Write comment
Join the HowToJoomla Community!
- Create a profile
- Connect with other members
of the community - All for FREE
Already a member? Login here.
hey i like this article it's working properly



I was looking for this type of post just in case JoomlaPack doesn't work.
I bet this way is much "safer" and would result less chances of bug or glitch in transferring existing site to new server