How to secure your Joomla installation's PHP settings using cPanel

This tutorial assumes you are already logged in to your cPanel account

1) Click File Manager

 

2) With Web Root selected, click Go

 

3) Browse to your Joomla directory


4) Scroll down to find htaccess.txt

 

 

You can use the provided htaccess file or create your own. For this tutorial, we'll use the file that has already been created for us

5) Right click the file and choose Edit

 

 

This is the default htaccess file that Joomla creates for you. Let's add a few PHP settings now


6) The first we'll add is php_flag display_errors and set the value to off. This will prevent PHP from displaying any errors that may occur while a user visits your Joomla site


7) The second we'll add is php_flag allow_url_include and set it to off. This will help prevent hackers from forcing Joomla to run potentially harmful code, also known as cross site scripting


8) Click Save Changes

 

At this point, you can either continue editing the file or return to the file manager


 

This is the end of the tutorial. You now know how to add settings to your htaccess file

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to back up your Joomla database using cPanel

Backups are an essential part of any active website. Not making regular backups can be a disaster...

How to back up your Joomla database using phpMyAdmin

Backups are an essential part of any active website. Not making regular backups can be a disaster...

How to change the default Joomla favicon

A favicon is a small image that shows up next to the website's name. Here is the default Joomla...

How to change the Joomla directory using cPanel

This tutorial assumes you are already logged in to your cPanel account 1) Click File Manager...

How to download the latest Joomla version and install it on your server

1) For this tutorial, you will need to open your web browser and go to http://www.joomla.org...