How to Move Your Joomla! 1.5 Site to a New Server

Written by Cory | February 08, 2009 | Add Comment (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)Add Comment

0
Hey this is useful
written by pembaris crew, February 08, 2009
Hey,

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 smilies/smiley.gif
0
Changning database names
written by Noor Hammad, March 24, 2009
Thanks for a great article.

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.
0
Errors with migration
written by sdedhia, April 07, 2009
Hi!

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
661
need to create a SQL password. originally none was used.
written by Nigel Aves, April 29, 2009
The tutorial worked perfectly for me except one issue. Originally when SQL was setup I was not using a password (this was a test server) and now I need a SQL password. I've tried adding it to the configuration.php but all I get is a blank screen. (Nothing loaded.) (As a test I have tried installing a new Joomla and that works perfectly, so I don't think this is a MySQL permissions issue.)

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
0
...
written by Natasa, May 04, 2009
Thank you for your post.

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 smilies/sad.gif((
699
QuickStart package
written by Najeeb, May 08, 2009
How do you create a QuickStart package for Joomla?

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.
0
administrator site and absolute paths
written by Wes, June 04, 2009
I've moved the Joomla 1.5.9 site as you've suggested however when I go to the administrator site it doesn't let me in using IE7 or IE8 and in firefox it allows me to go to each section but not be able to use the buttons such as Save, Apply or close? Any help with this problem would be much appreciated?

Wes
62
...
written by Cory, June 04, 2009
Hi Wes... it sounds like you didn't get all of the files moved over. It's hard to say without actually seeing the server.
0
Spanish translation
written by lobo_tuerto, July 08, 2009
Hi guys,

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/
0
Ugh, could you fuse this message and the last one...?
written by lobo_tuerto, July 08, 2009
0
site under maintanance
written by zarana, July 11, 2009
i upload the joomla on my server bt i got SITE UNDER MAINTAINANCE message.. & in backend admin side also i got 404 error..
0
No access to back-end after move to new server
written by Bibbi, July 16, 2009
I have succeeded in moving a new site to an online server following the above instructions, and I am able to se the front-end as well as the back-end login. However, when I enter the user name and password in the back-up, I do no longer have access. This also goes for the front-end where there is a login.

I have previously uploaded a site with no problems.

Can anyone tell me what is wrong and how I solve the problem?

Thanks.
Bibbi
0
After moving site,no longer work that site
written by reshma, July 20, 2009
I have made 3 site in joomla same package.All site is properly work at localhost server,but when I am move that site form localhost to the server it work properly for some days but after some days it will show blank page insted of my site.I have no idea about it.pl help me what is the real problem.
0
...
written by Lost Lion, July 24, 2009
This was an extremely easy to follow tutorial. I had my site moved and online in less than 5 minutes (that includes making and downloading the back-up, rewriting config.php, and uploading the files to the new server).

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.
0
Grate article
written by yared, July 29, 2009
smilies/smiley.gifhey i like this article it's working properly
0
Really working!!
written by adamto, August 10, 2009
Hi!
Thanks for great instructions! I moved whole joomla in few minutes (+download and upload of files).
0
Absolute links
written by Lee White, August 14, 2009
I love this tutorial, everything works a treat, apart from one area. I moved a site to a clients server, and left a copy on my server. After a short while I removed the site from my server and all the images,pdf.s etc on the clients server ceased to function. It was only after a bit of exploring I discovered that all the images, .pdf's etc all had a relative link to my server, hence the fact that they didnt work.The site has hundreds of articles which would take me an age to go into each article and change all the links to relative. Is there an easy way of doing this, I really would appreciate some help with this as I'm at the end of my tether.
0
Absolute links
written by Lee White, August 14, 2009
In the above comment I put relative links. What I meant to say was absolute links....Doh...I'm so stressed...Hope someone can help.
62
...
written by Cory, August 14, 2009
Hi Lee,

The way I see it, there are a couple of ways to solve this, both of which require a bit of programming skill:

One is to write a script that goes through each record in your database and replaces your server address with your client's address.

The other is to write a Joomla plugin that runs before a page is rendered. It would take the contents of the buffer and replace your server address with your client's server address.

Good luck!
1040
Moving Database and Site
written by John, August 26, 2009
Hey All,

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.
0
Reply to John's question.
written by Nigel S Aves, August 26, 2009
John,

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.
1040
Moving Database and Site
written by John, August 26, 2009
Nigel,

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.
0
DB error 1146
written by reuelc, August 30, 2009
hi, first i want to thank the author of the article on how to move your joomla site.. it's really very easy.

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
0
DB error 1146
written by reuelc, August 30, 2009
I think i found a clue.. I discovered that the prefix in 'jos' now has 'joom'....

0
...
written by reuelc, August 30, 2009
Finally! just changed the prefix in configuration.php then viola.. problem solved! thanks!!!
1101
webhoster phpmyadmin does not recognize my localhost.sql.gz
written by veronique, September 12, 2009
I want to upload joomla localhost.sql.gz file to ebhost php myadmin
I followed all the steps
1-click database restore says everything worked
BUT when I check webhost phpmyadmin the database is empty (0)
1101
I had uploaded the wrong file/ now another pb
written by veronique, September 12, 2009
now I have everything downlaoded (my database is in two parts, that may be the problem) two databases in local and the identical databases in remote
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?
1262
New site still redirects to old site
written by Rob, November 12, 2009
Hi Cory, Great post! Everything worked first try... except getting the new site to load properly. My old site is domainname.com and on a non-GoDaddy host. My new site is domainname.net and is on GoDaddy hosting. After copying all the files to the new webhost and importing the database to the new DB, I load the .net website to see if it worked. The first error I got was cannot connect to the MySQL DB. The username and pw were correct, so I decided to change localhost to the MySQL DB's IP and the error went away but it redirected me to the .com site. Is there a step that I am missing or a value in one of the DB tables that is preventing it from loading as .net? I changed the $live_site value to the .net site and don't see anywhere else in the config file this needs to be changed. Thanks!
1271
...
written by Robert, November 16, 2009
Hi,

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!
1278
Failed moving Joomla site
written by Jose Picon, November 17, 2009
Hi! I tried to move Joomla site using this guide, but I only can have access to administrator mode. When I try to open index.php on the site's root it shows me the source code as plain text.

What would be the cause of this problem?

Thanks!
1278
Answer to Robert
written by Jose Picon, November 19, 2009
Hi Robert!

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
1328
Compressing files
written by Susan Zakar, December 01, 2009
On some shared hosting, you can compress files using the cpanel. If you do that, then you can move a single file down and up to move your files, then uncompress the files on the target server. I've found that on some shared hosting servers, if you use a zip file for compression, file permissions may not be preserved. Using .tar compression seems to work, though. Just be sure you are in the same (relative) place in your directories where you compress and uncompress.

Thanks for the step-by-step!
1357
DB error 1146
written by Carl Diaz, December 10, 2009
Ok, this my first time using Joomla. As a newbie there are a few things not spell out that well maybe I did wrong. Reason why this is not working for me. I site up a site with Xampp and Joomla, the folder was default Joomla15 (dont know if I can put whatever name I want. suppose i have 2 sites). I already have a website w yahoo so I want to test this one out live. I tried to follow the, "How do you copy a site from localhost to a remote host?"

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

You must be logged in to post a comment. Please register if you do not have an account yet.

busy

Join the HowToJoomla Community!

  • Create a profile
  • Connect with other members
    of the community
  • All for FREE

Sign up now!

 

Already a member? Login here.

HowToJoomla is proudly hosted by Eleven2

 
 
 

Search the Joomla! Community for Resources

 
 

Latest Community Activity

Yesterday
Mustaq Seems like Spam PM's are spreading here too, like Kunena.com 03:43 PM
Enzo Fiorillo Palacio added My Articles application 02:40 PM
Enzo Fiorillo Palacio added Feeds application 02:40 PM
3 days ago
Marga van der Tol joined a group HowToJoomla! 06:38 PM
1 week ago
Gary Edmonstone and john birch are now friends Jan 28
 

Welcome to Our Newest Community Members

Jenny McWilliam
Harry
Caryl Forrest
Larry Levenson
rosemary
Gavriel Patlis
Jonathan
turgut
joomloo
wjr
Marga van der Tol
greg
 
 

Latest Comments

About HowToJoomla

Why am I getting this. Will admin please check the ...

How to Display Your

Hi, I have system params set to "NO" for "show pag ...

How to Fix Joomla C

Thanks for this posting. The introduction solves w ...

How to Display Your

Hi, I used this tip as part of a SEO technique. Ad ...

How to pick a Joomla

Hi, I just want to mention 3 problems I have with ...