We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.


More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsJoomla

Could Not Write to the Configuration File

Cloud Servers 727 x 90

Sometimes you might face an error message “Could not save data. Error: Could not write to the configuration file” when changing something in Joomla configuration. This error usually occurs when Joomla do not have write permissions to configuration.php file.

Follow These Steps to Fix “Could not Write to the Configuration File” Error

Check if the ownership of the configuration file is correct. If using a shared hosting service, it should already be configured to allow writing in files through a website. If using a private server like VPS or dedicated, it is advised to set ownership to the user, under which the web server is running. For example, if the web server is running under the user “apache”, you need to set ownership accordingly. The file owner can be changed by using the following command while connected to shell console:

chown apache:apache configuration.php

If the last step did not help, there might be another issue causing problems with permissions. Therefore, you should check to make sure the file has the right permissions set. In most cases, the file permissions should be set to 644. This can be done through an SSH console by using the following command:

chmod 644 configuration.php

You can also use the server control panel provided by your hosting service provider. For example, if you are using DirectAdmin, navigate to public_html and select the checkbox for file configuration.php. Then, at the bottom of the page find “set Permission”. It should look like this.

Set file permissions

In the input field, enter 644 and click “set Permission”.

If you are using cPanel, permissions can be set the same way. All you need to do is to open the file manager and navigate to public_html directory. Then, select the required file and find the “Change Permissions” button and click it.

A pop-up window will appear with available permissions. From here you can set the needed permissions for a particular file.

Set file permission in cPanel

Then select the checkboxes like in the screenshot above to set permission mode to 644 and click on the button “Change Permissions”. Permissions will be changed for the selected file.

Now you should be able to save configuration settings in the Joomla administrator panel.

Rate this Tutorial:
No Comments Leave a Comment
Leave a Comment

Cloud Servers 1 230×230

Other (197)

Popular Keywords

Web Banner 1 230×230