How to Install Joomla in a Subdirectory (2 Methods)

If you want to learn how to install Joomla in a subdirectory, then this JovialGuide is for you!

Installing Joomla in a subdirectory allows you run multiple Joomla installations on one domain, and also saves you from registering a new domain name.

In this JovialGuide, we will show you how to install Joomla in a subdirectory in 2 ways.

Since we are showing you how to install Joomla in a subdirectory using 2 methods, we have provided quick navigation links to the 2 methods in this JovialGuide.

Here are the 2 methods to install Joomla in a subdirectory:

Installing Joomla in a Subdirectory vs Subdomain: Which is Better?

If you are building a Joomla website or you are creating a blog in Joomla, you may find it confusing to choose between installing Joomla in a subdirectory and installing Joomla in a subdomain.

Search engines see and treat subdirectories and subdomains as separate websites, even though they carry or share the same root level domain name.

Basically, from search engines’ point of view, example.com/subdirectory is completely different from subdomain.example.com, and both of them are treated as two different websites.

When it comes to SEO advantage, subdirectories benefit directly from the domain authority of the root or parent domain, which in turn, can result to an improved ranking for the website hosted on the subdirectory.

However, in the case of a subdomain, it is a different story entirely, basically because search engines treat subdomains (subdomain.example.com) as different websites entirely!

What do you Need to Install Joomla in a Subdirectory?

If you already own a domain name and a hosting that you want to use to install Joomla in a subdirectory, then there are no special requirements to install Joomla in a subdirectory. However, if you do not have a Joomla hosting and a domain name, we recommend A2 Hosting because they are secure, reliable, fast and affordable.

Do note that shared Joomla hosting is not completely recommend for the sake of server performance when there is an increase in traffic and resource consumption in the server. However, as your website grows, you will need to upgrade to a higher A2 Hosting plan (if you are using the small-sized plan), or see the best managed Joomla hosting for other options.

Method 1: How to Install Joomla in a Subdirectory via FTP (Manually)

This method of installing Joomla in a subdirectory will show you how to install Joomla in a subdirectory by using your Joomla hosting File manager or FTP client.

Note that this is a manual method of installing Joomla in a subdirectory.

To install Joomla in a subdirectory via FTP, log-into your Joomla hosting cPanel.

Log-into Hosting cPanel

If you have not gotten a Joomla hosting yet, get started with A2 Hosting.

Step 1. Create a Database

Joomla is a database-driven web application. It stores all of your contents in a database.

You will need to create a database to hold the contents of your Joomla website installed in a subdirectory.

To create a database, log-into your Joomla hosting cPanel if you have not. Under the “Databases” section, click on “MySQL Databases” or “MySQL Database Wizard”.

cPanel - MySQL Databases

On the MySQL Database page, go ahead and enter your new database name and click on the “Create Database” button to create a new database.

cPanel - Create MySQL Databases

After that, click on the “Go Back” button to return to the MySQL Database page.

Step 2. Add a New MySQL User

The next step is to add a new MySQL user.

Scroll down to the “MySQL Users” section, enter a new user details and click on the “Create User” button.

cPanel - Add MySQL User

You just added a new MySQL user!

Step 3. Add User to Database

Now is the time to grant your newly created user the privileges to work on the database you created.

Simply scroll down to the “Add User to Database” section, select your newly created user & database and click “Add”.

cPanel - Add User to Database

cPanel will grant the user full privilege to work on the newly created database.

Step 4. Download Joomla

To download Joomla, goto Joomla and click on the download button.

Download Joomla

Then Joomla will be downloaded into your local storage in .zip format.

You may want to see how to download Joomla.

Step 5. Upload and Extract Joomla

After you have downloaded Joomla into your local storage, this is the time to upload and extract it to your webserver.

To upload and extract Joomla (the zip file you downloaded) to the webserver, connect to your Joomla hosting cPanel or FTP client if you have not.

Once you are logged-in, under “Files”, click on “File Manager”.

Files - File Manager

After that open the “public_html” folder. This is the root folder where your website files are stored.

Inside the “public_html” folder, upload and extract Joomla to it.

After extraction, you will notice that the Joomla zip file you extracted, created a folder named something like “Joomla_x.x.x-Stable-Full_Package” (“x.x.x” is the Joomla version) which contains Joomla files. This is actually the subdirectory you are going to install Joomla to.

However, if you visit your website to install Joomla in a subdirectory, your URL will be “example.com/Joomla_x.x.x-Stable-Full_Package”. This is also the URL your website users will use in finding your Joomla website that is installed in a subdirectory.

Joomla in Subdirectory URL Example

As you can see, the subdirectory name is too lengthy & unfriendly, and you would like to create a custom directory name for it. What we have to do now is to rename it.

Still inside the “public_html” folder, select and rename “Joomla_x.x.x-Stable-Full_Package” to the name you would like to give your subdirectory either in capital or small letters and save. For example; you can name your subdirectory joomla, Store, blog, etc.

If you are going to add a space to your subfolder name, it is a good practice to use an hyphen instead of a space for a folder name. Example: “new-folder” not “new folder”.

Alternatively, inside the “public_html” folder, create a folder. Inside this subdirectory you will upload and install Joomla to it.

For this JovialGuide, we are naming our folder “subjoomla”.

If you are going to add a space to your subfolder name, it is a good practice to use an hyphen instead of a space for a folder name. Example: “new-folder” not “new folder”.

After that, upload and extract Joomla to the “public_html” – the root directory of your File Manager.

You will notice that the Joomla files you uploaded and extracted are in a new folder it created, named “Joomla_x.x.x-Stable-Full_Package”. What we want is to have the Joomla files right inside the subdirectory we created so that we can install Joomla to it. To do this, (instead of renaming the folder like the first option) we will have to move the entire Joomla files to the subfolder we created earlier.

Open the “Joomla_x.x.x-Stable-Full_Package” folder, highlight all files and folder and move them to the subdirectory you created.

Step 6. Install Joomla in a Subdirectory

This is the part that we will install Joomla in a subdirectory.

To install Joomla in a subdirectory, visit your root website address and add the subdirectory name you created to the end of it.

It will look like this “example.com/sub-dir-name”. Where “example.com” is the root or parent URL and “sub-dir-name” is the subdirectory you are going to install Joomla to.

Before starting the installation, do note that the Joomla installation is divided into 3 stages. Namely: Configuration, Database and the Overview stage.

Main Configuration Stage

On the “Configuration” stage of Joomla installation, you will find Main Configuration and the Super User Account Details’ sections.

Start by selecting your preferred language. For the sake of this JovialGuide, we are choosing English (United States).

On the “Main Configuration”, enter your sitename into the Sitename field, and a short description (of your site) of 20 words in maximum into the Description field.

Joomla Web Installer - Main Configuration

The Site Offline option lets you set your Joomla website offline for maintenance. In this case, we don’t want it to be offline. So, the Site Offline option will be No – for your Joomla website to be online.

After that, on the “Super User Account Details”, enter your Email address (one you still have access to), Username, Password and Confirm Password (enter the same password you used for the Password field into the Confirm Password field) into their corresponding fields.

Joomla Web Installer - Super User Account Details

Make sure you write them down and keep them save, because you will use them to log-into your Joomla website, and also to retrieve your login detail(s) if you forget it.

You can always change these details at the backend of Joomla after installation.

Note – that the fields marked with asterisk (*) are most important, and cannot be left empty!

Once you are done, click on the “Next” button to proceed to the Database Configuration stage.

Database Stage

The “Database” stage is the stage that you will configure your Joomla database using the details provided by your Joomla host. If you do not know your Joomla database details, do contact their support team for assistance.

If you have your Joomla database details provided to you by your hosting provider, go ahead and select the Database Type, enter Host Name, Username, Password, and the Database Name into their corresponding fields.

Joomla Web Installer - Database Configuration Stage

After that, enter a table prefix into the Table Prefix field (four to five character long, and must end with an underscore), or use the randomly generated one.

For the old Database Process, it lets you either backup or remove any existing tables from the previous Joomla installation, which has the same Table Prefix as the one above. So, we will select the Remove option to remove it, if it exists.

After you are done, click on the “Next” button to proceed to the next stage.

Overview Stage

The Overview stage is the last stage in the Joomla installation. It presents all of the configuration details you entered from the Configuration to the Database stages, and also allow you setup some other configuration settings.

Sample Data are already created, or ready-made contents that are installed to a Joomla website to simplify the building processes. For the Install Sample Data configuration under the Finalization section, select “None”.

Joomla Web Installer - Finalization

For the Email Configuration option under the Overview section, select the Yes option. Once it is selected (yes), another configuration option – “Include Passwords in Email” will appear. For security reasons, select No, so that your password will not be included in the Email that will be sent to you.

Joomla Web Installer - Overview

The Main Configuration section displays all of the details you entered in the Main Configuration stage, except your password details. While the Database Configuration section shows all of the database configurations you entered in the Database Configuration stage, except your database password.

Joomla Web Installer - Main and Database Configuration Sections

The Pre-installation Check section shows you if your hosting server meets the minimum requirements to run Joomla. And for the Recommended Settings, it displays all of the recommended settings to ensure full compatibility with Joomla.

Joomla Web Installer - Pre-installation and Recommended Settings

If any setting is marked “No” in the Pre-installation Check section, do contact your Joomla host for assistance.

If you find out that you missed any configuration setting, you can easily go back and correct it/them by clicking on the Previous button above or below the page.

After you have confirmed everything, click on the “Next” button for the wizard to run the process.

If you see “Congratulations! Joomla is now installed”, then you just installed Joomla!

On this same page, you will see an extra step to install new language, administrative login details, and other things.

Joomla Installed Successfully

Before we can build a Joomla website, we will have to remove the installation folder for security purposes.

To remove the installation folder, simply click on Remove “Installation” Folder and the installation folder will be removed automatically.

You may also want to see our detailed JovialGuide on how to install Joomla on Android for more.

Congratulations! You just learned how to install Joomla in a subdirectory via FTP.

Access and Log-into the Joomla Backend

After installing Joomla in a subdirectory, you would want to log into the backend of your Joomla website so that you can build a website.

The admin log-in page of your Joomla website could be accessed by adding /administrator to the end of the URL. For example, If your Joomla homepage URL is example.com, adding /administrator to the end of example.com, becomes example.com/administrator.

However, if you installed Joomla in a subdirectory, then you will have to access the root URL and add “/administrator” to the end of the subdirectory URL.

It becomes “example.com/subjoomla/administrator”. “subjoomla” is the subdirectory Joomla was installed to.

You can copy the URL and replace “subjoomla” with your subdirectory name.

Once you type in the correct Joomla login page URL, you will be presented with a page like the one below.

Joomla Administrator

Now, to log into your Joomla website, enter your correct Joomla admin username and password (the ones you used while installing Joomla in a subdirectory), and click login.

If you do not like this method of installing Joomla in a subdirectory via FTP, goto the next section for another method.

Method 2: How to Install Joomla in a Subdirectory via Softaculous

This method will show you how to install Joomla in a subdirectory through Softaculous app installer.

Since everything is done on the same page in a few clicks, this method of installing Joomla in a subdirectory is easier and simpler than installing Joomla in a subdirectory via FTP.

Note that this is an automated method of installing Joomla in a subdirectory.

To install Joomla in a subdirectory via Softaculous, log-into your hosting cPanel.

Log-into Hosting cPanel

If you have not gotten a Joomla hosting yet, we recommend A2 Hosting.

When you are logged-in, locate the “Software” or “Softaculous Apps Installer” section and click on “Softaculous Apps Installer”.

cPanel - Softwares: Softaculous Apps Installer

After that, under the “Top Scripts” section, click on “Joomla”.

Softaculous Apps Installer - Joomla

This will open up a page containing details about Joomla and your hosing server. To start installing Joomla in a subdirectory, click on the “Install Now” button.

Softaculous Apps Installer - Joomla Details

On the “Software Setup” section of Joomla installation, select the Joomla version you would like to install in a subdirectory. The latest version is completely recommended for security reasons.

Softaculous Apps Installer - Choose Joomla Version

After that, choose the protocol of your choice. Basically, there are four different protocols. Namely: the http://, http://www, https:// and the https://www. If your Joomla website uses SSL – Secure Socket Layer, then choose any of the HTTPS protocols.

Next, select the domain that will serve as the root or parent domain of the website.

After you have done that, this is the time to select a subdirectory to install Joomla to.

Since we want to install Joomla in a subdirectory, in the field for subdirectory, enter a directory name you would like and it will be created automatically for you.

Softaculous Apps Installer - Choose Joomla Installation URL

Be sure to enter a reasonable name into the subdirectory field, because it is what your users will use in finding your Joomla website that’s installed in a subdirectory (for example; example.com/sub-dir-name).

If you are going to add a space to your subfolder name, it is a good practice to use an hyphen instead of a space for a folder name. Example: “new-folder” not “new folder”.

On the “Site Settings” section, enter your Joomla “Site Name” and “Site Description” into their fields.

Softaculous Apps Installer - Joomla: Site Settings

After you have done that, on the “Database Settings” section, select if you would like to import sample data. If not, select “None”!

Softaculous Apps Installer - Joomla: Database Settings

For the “Admin Account” section, enter your preferred Admin Username, Password, Real Name and Email.

For Joomla security reasons, use password combinations that are difficult to guess, and also use an Email address you still have access to.

Softaculous Apps Installer - Joomla: Admin Account

On the “Choose Language” section, go ahead and select the language of your choice.

Softaculous Apps Installer - Joomla: Choose Language

After that, click on the “Advanced Options” section, and other options will toggle show.

Start by entering a database name to be created for the installation. Or you can leave the generated database name.

Next, enter a table prefix or leave the automatically generated one. If you are entering a table prefix, make sure it is 5 character long, and ends with an underscore (_).

For “Auto Upgrade”, for security reasons, select “Upgrade to any latest version available (Major as well as Minor)” so that it will automatically upgrade Joomla when there’s a major or minor release.

Now select a backup location where your Joomla backups will be saved.

Softaculous Apps Installer - Joomla: Advanced Options

After you are done, confirm everything from the top.

Once you have confirmed everything, click on the “Install” button and wait for the wizard to install Joomla in a subdirectory.

If the wizard installs Joomla in a subdirectory successfully, then you will see a success message that says “Congratulations, the software was installed successfully”!

Joomla Installed Successfully

Congratulations! You just installed Joomla in a subdirectory via Softaculous.

You may also want to see our detailed JovialGuide on how to install Joomla on Android for more.

Access and Log-into the Joomla Backend

After installing Joomla in a subdirectory, you would want to log into the backend of your Joomla website so that you can build a website.

The admin log-in page of your Joomla website could be accessed by adding /administrator to the end of the URL. For example, If your Joomla homepage URL is example.com, adding /administrator to the end of example.com, becomes example.com/administrator.

However, if you installed Joomla in a subdirectory, then you will have to access the root URL and add “/administrator” to the end of the subdirectory URL.

It becomes “example.com/subjoomla/administrator”. “subjoomla” is the subdirectory Joomla was installed to.

You can copy the URL and replace “subjoomla” with your subdirectory name.

Once you type in the correct Joomla login page URL, you will be presented with a page like the one below.

Joomla Administrator

Now, to log into your Joomla website, enter your correct Joomla admin username and password (the ones you used while installing Joomla in a subdirectory), and click login.

Fix Permalinks Issue

If you install Joomla in a subdirectory separately, and on the root domain, you will notice that there’s a .htaccess conflict.

To fix this, you will have to open your .htaccess file, copy and paste the following configuration rules.

# BEGIN Joomla
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /your-subdirectory/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /your-subdirectory/index.php [L]
</IfModule>
# END Joomla

After you have pasted the above configuration rules, replace “your-subdirectory” with your subdirectory name and save.

What to do After Installing Joomla in a Subdirectory

After installing Joomla in a subdirectory, there are a few things that you need to do to have a fully functional Joomla website.

See what to do after installing Joomla to learn more.

After installing Joomla in a subdirectory, you will need Joomla tutorials to get you started.

Here are some useful resources to help you with Joomla:

We hope this JovialGuide helps you learn how to install Joomla in a subdirectory via FTP and/or how to install Joomla in a subdirectory via Softaculous.

Furthermore, you may want to see the types of websites you can create with Joomla.

See other of our Joomla tutorials for more.

JovialGuide

We provide comprehensive tutorials. Reach us on Facebook via JovialGuide.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Shares