The How to Install Joomla 1.5 with Search Engine Friendly
(SEF) URLS
Joomla is an open source Content Management System (CMS)
with tonnes
of 3rd party templates and add-on modules. Before installing Joomla be sure
you like how it operates! Log into a demo site and test out the operation.
Then follow the directions below and if it looks too complicated we can do it for you,
just submit the contact form at the very bottom.
This tutorial describes how to install Joomla! 1.5.10 (Wohmamni) and make it Search Engine Friendly (SEF). The specific configuration was Fedora 8 with PHP 5.2.6, Apache 2.2.9, MySQL 5.0.45. Try here for setting up SEF with a Joomla 1.0.x release. Note this tutorial is for a new install - not an upgrade or migration! For migrations try here: http://docs.joomla.org/Migrating_from_1.0.x_to_1.5_Stable
Install Joomla
The Joomla install is relatively straight-forward. Before you start find your login information for:
- FTP hostname, login and password
- MySQL database hostname, database name, login
and password ready. If you aren't sure what
they are just ask your web host.
If at all possible, get shell access to your server; you can upload the compressed file (i.e. Joomla_1.5.10-Stable-Full_Package.zip) and unzip it there. If not, you need to unzip on your local directory then FTP everything over; you are in for a long upload! I unzipped into directory:
/var/www/html/joomla
but if this is going to be your only site on the server, you may as well put it in the root directory.
Once uploaded, just enter the URL for your site in Firefox. The install screen will come up. I got one warning:
configuration.php Writable NO
This file does not exist but is created by the installation process. What I did was make the install directory writable (and don't forget to change it back after the install: chmod 755 joomla):
chmod a+w joomla
Step 4) Enter your database params. If you are on your 2nd install try or have an old installation, click the advanced tab to delete old tables.
Step 5) Enter your ftp information. If you are installing on a local server you need to set up an FTP Server which varies across different Linux distributions, in Fedora it is vsftpd under services. It ties in with user accounts so you can either use an existing user or make a new user, joomla, and set the home dir to /var/www/html/joomla
Be sure to expand the advanced tab and save the password.
If you can't get ftp to work, or you don’t want to use it, you can disable it and instead change directory permissions. If you have shell access you can run these commands:
chmod a+w administrator/backups/
chmod a+w administrator/components/
chmod a+w administrator/modules/
chmod a+w administrator/templates/
chmod a+w cache/
chmod a+w components/
chmod a+w images/
chmod a+w images/banners/
chmod a+w images/stories/
chmod a+w language/
chmod a+w mambots/
chmod a+w mambots/content/
chmod a+w mambots/editors/
chmod a+w mambots/editors-xtd/
chmod a+w mambots/search/
chmod a+w mambots/system/
chmod a+w media/
chmod a+w modules/
chmod a+w templates/
chmod a+w libraries/
chmod a+w includes/
chmod a+w logs/
Step 6) Configuration for a new install is simply to enter a site name and the admin password.
If you make a mistake or want to start over:
mv configuration.php configuration.php-old
Finally, before you can login, you need to remove
the whole installation directory. You can use FTP or for shell
access just run:
rm -f installation
So you've installed Joomla, congratulations! The install was relatively painless and you can start setting up
your site but if you're concerned about your ranking in the search
engines - and who isn't - you need to set up a few more items.
Joomla Core SEF – Search Engine Friendly
URLS
The first step of SEF is to get ride of those nasty default URLS:
index.php?option=com_contact&Itemid=3
Here is how; from the admin menu, select:
Site-> Global
Configuration -> Tab: SEO
then set Search
Engine Friendly URLs to Yes for all three options
But before SEF will work, you need to rename: htaccess.txt to .htaccess
This is a permissions file on your server you can change it a number
of ways, the easiest for most people is probably FTP, go to the
place you installed Joomla and rename htaccess.txt to .htaccess.
If a file called .htaccess already exists, you'll want to download
it and merge it with the htaccess.txt file.
Now browse a few pages on your site. Wow! a big improvement over Joomla 1.0.x, so good in fact that you don’t even need 3rd party SEF extensions. But if you want even more power read on to install the popular sh404SEF component. If you had problems, see the next section for troubleshooting tips.
sh404SEF add-on Components for Search
Engine Friendly URLS
The sh404SEF component can be found here:
http://extensions.joomla.org
then
search "sh404SEF" to find it. Be sure to download the 1.5 version!
Go to Extension->Install/uninstall and browse to the downloaded zip file. After a successful install you'll find it under Components-> sh404SEF. To start it up go to Configuration->Main and check "Enabled" . Now the big decision; to use htaccess or not. Why make things more complicated? try going without it and see if it works. If there are problems or you are sure you want to use it, you now have to download and edit the .htaccess file to enable
3rd party
SEF. Find the 3rd party section and remove the # at the start of each line. Then comment out the native Joomla SEF option (place
a # at the start of the line) in the .htaccess file BUT be sure
to leave the native Joomla SEF option ON under Site-> Global
Configuration -> Tab: SEO
Upload the .htacccess file back to your server. Here is the relevant section from an updated htaccess file:
########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
Troubleshooting Joomla SEF problems.
If the native SEF is not working there are a number of things you can try but now you are getting into serious geek territory. If you were struggling just with the install, you may be in over your head, if may be wise to find help!
Do you have FastCGI instead of Apache? Does SEF somewhat work but you lose all CSS formatting and it looks like an extra “index.php” is in the URL?
To see if you have FastCGI, check here:
Help->System Info->PHP Information
Then search for “Server API”, if it says FCGI or FastCGI try this:
Go to the Joomla root directory and create a file php.ini with this content:
cgi.fix_pathinfo=1
Retest if SEF works. Be sure to keep the Apache mod_rewrite checked even though, technically, you don’t even have Apache. Still not working? edit configuration.php in the Joomla root directory, search for “live_site” and enter you site’s full URL:
var $live_site=”http://www.mysite.com”
Are you setting up a test Joomla installation on your own computer? Does enabling SEF cause 404 "page not found" errors?
Make sure httpd has mod_rewrite enabled. (Note: if you are on a big web host they will likely have already done this and you wouldn’t have permission to edit this file anyway. Edit file (location for Fedora):
/etc/httpd/conf/http.conf
i) Search for mod_rewrite, there should be no # at the start of this line:
LoadModule rewrite_module modules/mod_rewrite.so
ii) Make sure the root directory allows OverrideALL. The section of code looks like this (there may be some other stuff there but make sure AllowOverride is All not None):
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
iii) Make sure the global AllowOverride is ALL. The section of code looks like this:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
Restart the httpd daemon (System->Aministration->Services)
Here is a litmus test to see if you’ve got mod_rewrite properly enabled.
Backup .htaccess :
cp .htaccess .htaccessBAK
Then edit it and clear out everything and type in only this:
RewriteEngine On
RewriteRule (.*) http://www.google.com/
Anything entered in the browser should go to Google. If it doesn’t work you’re going to have to troubleshoot some more otherwise restore the .htaccessBAK file, restart httpd, and retest Joomla SEF.
Note if you installed joomla in a subdirectory, you'll need to uncomment this in the htaccess file:
RewriteBase /joomla
Still not working, maybe we can help...
I want Joomla with SEF!
We will install Joomla and set up SEF for
$80. On an existing Joomla site we will get a broken SEF working for the same price. Need a site template? Commission a custom Joomla template
and we'll install Joomla for free.
|