Unable to edit wp-config.php to enable SSL variable on my free hosting

Hello,

My name is AnibalMarketing, and I am using your free hosting service at the domain: https://anibalmarketing.42web.io/

I am trying to configure the Really Simple Security plugin to enable SSL properly, but I keep getting this message:

“Your wp-config.php has to be edited, but is not writable. Set your wp-config.php to writable and reload this page. To safely enable SSL on your server configuration, you should add the following line of code to your wp-config.php:
//Begin Really Simple Security Server variable fix
$_SERVER[“HTTPS”] = “on”;
//END Really Simple Security”

I do not have access to change the file permissions via FTP or file manager, and I cannot make the wp-config.php writable.

Could you please help me by enabling this setting on your side, or advise how I can proceed with this on free hosting?

I have already verified my website with Google Search Console by adding the meta tag through a plugin, and the site loads with HTTPS and shows a secure connection, but this plugin still asks me to add the code in wp-config.php.

Thank you very much for your support.

Best regards,
AnibalMarketing

There are a few weird things going on here:

  • The current permissions of your wp-config.php file are set to 0600. This means that the file is writable by you, through the file manager or FTP. There is nothing we can do that you can’t do yourself.
  • We run PHP under the user of your account. That means that PHP is able to write to any files in your website that you can write to can also be written to by PHP. So I have no idea why WordPress would say it cannot write the file.
  • I recommend against settings this “variable fix”. This variable should be correct already. If it isn’t, we’d like to know so we can fix it. But again, this variable should already be set correctly when your website is being accessed over HTTPS. And blindly telling WordPress that HTTPS is in use, even if it isn’t, could cause any host of issues.

Can I ask why you want to use Really Simple SSL in the first place? You don’t need a plugin to “enable SSL properly”. SSL is enabled on the server side by default, and all you need to do to use it is to update your website URL.

7 Likes

I use RS SSL because when i put the url without https and only anibalmarketing.42web.io it enters by default on http without the s and i want that people enter by default on https://anibalmarketing.42web.io

In admin->settings, just change your “Site URL” to include the “s”, no plugin needed

8 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.