Giving Joomla its own installation directory

Joomla CMS Logo
Joomla CMS Logo

If you have been using WordPress, then you might have been in love with the pretty feature of WP that allows you to install WordPress in its own installation directory. This comes handy when your site homepage is different from the directory of WP installation as illustrated here. There are many benefits of doing this, the most important being optimized and better management of website files and folders. You might want to implement this feature in Joomla as well. However, sadly Joomla CMS doesn’t come handy with this feature even though we want to keep our site files uncluttered from rest of our hosting directory files.

So, the problem with you is “How do I install Joomla in its own directory apart from the site address?” This means we want Joomla address (URL) (suppose at and site addres (URL) (suppose at Let’s find a way out of this – since there are no any official solutions available. We assume you have installed Joomla in its own directory first ie say As of now visitors have to browse /joomla in the domain to see the site. Now, how do I make my Joomla site my domain home page, ie how toredirect domain to joomla directory.

WordPress Installation Directory Custom
WordPress Installation Directory Custom

The quickest and simplest way to make your Joomla site your domain home page is to redirect your web traffic to the Joomla installation directory. Lets create an index.php file in your /httpdocs folder and enter the following script in the file…

<?php header("Location:"); ?>

Ensure index.php is the only homepage file in your hosting directory (remove index.html or similar files) so that whenever a visitor comes to your index.php takes care of it all to redirect to the joomla site. So, you can now be clear that locating all Joomla files inside public_html or httpdocs folder as a security risk can be controlled (upto some extent).

If this method doesn’t work out for your domain, then you still have an advanced method using .htaccess file manipulation which requires more knowledge. You have to set up a permanent redirection using .htaccess first in the domain root folder, with option to redirect all queries from www or non-www to your domain’s joomla folder. Second, is to work out on .htaccess file that comes with default Joomla installation script. More on this in the links given below.

One can compare and work out now: How to make your WordPress site your default home page of your domain while leaving WordPress in a sub-folder and How to make your joomla site your default home page of your domain while leaving joomla in a sub-folder.

We suggest you to visit the official Joomla documentation site at for advanced guide on this. Some useful articles regarding this are given here:

  1. Upgrading and migrating Joomla the easy way!
You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More