Uploading Joomla from win32 to cpanel webhosting

Wednesday, 07 December 2005

I wrote this tutorial because it took me several frustrating hours to figure out some not so obvious details. Most of the site's tutorials are stories of my practical experience with Joomla. I hope this will help someone.

The scenario:

You have developed a Joomla site  locally on your win32 box,  bought some cPanel hosting and you want the site to go online.

The steps of this operation are:

  • export the Joomla database from your PC
  • compress the local joomla root folder(for faster upload to remote web server)
  • create the remote database and import your data into it
  • upload and decompress the Joomla compressed file to your hosting server
  • and, finally, adjust configuration.php file on your hosting server to reflect the site move

What can go wrong?

Almost everything. I decided to use utf-8 encoding for my local Joomla database, in order to correctly store and display romanian accented characters. I didn't knew at the time that EasyPHP was running MySQL 4.1, and my hosting provider was running 4.0. So, the conversion was impossible, because exporting for compatibility from 4.1 and importing in 4.0 screws up accented characters. This is an internationalization problem which you may not be confronted to.

(I ended up manually replacing garbage in SQL compatibility export file, after 4 hour of Googling without a positive result).

Note that you have to create a database on the remote server using PHPMyAdmin prior to importing. You also have to create a username for your database. Furthermore, database name and username MUST be the same, or your Joomla site will not work.  

So, use latin1_swedish encoding, export your database to a gzipped SQL file using PHPMyAdmin, and import the .gz on the remote server.

Next, we have to copy the Joomla folder tree  to our hosting provider.

This is done by creating a .zip archive containing the Joomla subfolders and files from your local site. You have to ftp the file to the remote server, and use some web-based or console command to unpack it.

Fairly simple, if it wasn't for the file permissions problem. Depending on your hosting provider, the owner of the uploaded files may be your cPanel user, if you upload using ftp, or apache, if you upload using a webshell. Unpacked files are also apache owned, as well as any Joomla component  or module installed via Joomla administration.

I noticed that my cPanel sets unappropriate file permissions when unpacking archives created on a windows box. Unpacking archives from cPanel preserves original file permissions, which I guess don't quite fit the Win32 ACL model. My solution was to

chmod +0777 -R /tmp/joomlafolder 

to set permissions to world-writable, and 

tar -cvf joomla.tar /tmp/joomlafolder

to create a tarball with my Joomla folder 

These commands are to be run on a Linux box, of course.

 After creating the tarball I managed to upload  and unpack it (finally having proper write permissions on Joomla files and subfolders).

the last step is editing your configuration.php file in your Joomla installation, to reflect the server change. This can be done using cPanel's text editor from the File Manager.

You only have to change a few things: 

$mosConfig_absolute_path changes to

/home/username/public_html/ ,username being your cPanel username. $mosConfig_cachepath changes to   $mosConfig_absolute_path value with the 'cache/' string appended

$mosConfig_live_site changes to your site's URL (e.g. www.mysite.org)

 , and $mosConfig_db changes to the database name which you created earlier.

Tip: check our resources catalog for affordable Joomla hosting. You can use Joomla Cloner extension to easily create Joomla backups directly from site administration

Give us some social love (it really works now)!

Reddit! Del.icio.us! StumbleUpon! Yahoo! Swik!

Be first to comment this article
RSS comments

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Please don't use comments to plug your web site. Links are rel='nofollow'-ed
  • Please refresh the page if you're having trouble with the security image code

:) :grin ;) 8) :p
:roll :eek :upset :zzz :sigh
:? :cry :( :x
Code:* Code

Last Updated ( Thursday, 24 July 2008 )
Web Hosting

Europe freelancer directory


Subscribe to TeachMeJoomla's newsletter

Auto tags

how to upload joomla to web hosting

uploading joomla database

how to upload joomla to remote server

upload joomla to cpanel

joomla cpanel upload

Uploading Joomla to CPanel

how to upload joomla in cpanel

how to upload joomla with cpanel

how to upload joomla to my ftp

joomla upload to web server tutorial

upload joomla template cpanel

cara upload joomla di webhosting


In which folder to upload joomla in a webserver

tutorial upload joomla

uploading joomla compressed on a server

cpanel permissions for joombla

how to upload joomla in webserver tutorial

joomla import database remote server

upload joomla from apache to online server

webhosting joomla ftp configuration.php

how can i upload joomla local server to webserver