Added WPLANG in the wp-config.php file, now nothing works

Keywords: WordPress - OS X - Technical issue - Other
Description:
Hi guys, I have no knowledge at all in programming, I added define(‘WPLANG’, ‘fr_CA’); in wp-config file to translate my website and now nothing works. I can’t access my wordpress anymore.
What happened and what can I do to fix the issue?

Thanks!

Hi @michael.descoteaux,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Regards,
Ibone.

6e1efa1d-3d29-e9d1-c883-e85861cb8d02

Hi @michael.descoteaux,

I checked your data of the bnsupport I don’t see this change

But in your logs of apache appears this error:

[Wed Jan 13 13:17:31.435662 2021] [proxy_fcgi:error] [pid 640:tid 140524122359552] [client 192.168.64.1:50656] AH01071: Got error 'PHP message: PHP Warning:  require_once(/opt/bitnami/apps/wordpress/htdocs/wp-config.php): failed to open stream: Permission denied in /opt/bitnami/apps/wordpress/htdocs/wp-load.php on line 37PHP message: PHP Fatal error:  require_once(): Failed opening required '/opt/bitnami/apps/wordpress/htdocs/wp-config.php' (include_path='.:/opt/bitnami/php/lib/php') in /opt/bitnami/apps/wordpress/htdocs/wp-load.php on line 37'
[Wed Jan 13 13:17:48.761703 2021] [proxy_fcgi:error] [pid 640:tid 140524113966848] [client 192.168.64.1:50671] AH01071: Got error 'PHP message: PHP Warning:  require_once(/opt/bitnami/apps/wordpress/htdocs/wp-config.php): failed to open stream: Permission denied in /opt/bitnami/apps/wordpress/htdocs/wp-load.php on line 37PHP message: PHP Fatal error:  require_once(): Failed opening required '/opt/bitnami/apps/wordpress/htdocs/wp-config.php' (include_path='.:/opt/bitnami/php/lib/php') in /opt/bitnami/apps/wordpress/htdocs/wp-load.php on line 37`

Could you check that file /opt/bitnami/apps/wordpress/htdocs/wp-load.php?

Regards,
Ibone.

Hi Ibone!

When I realized that the Wordpress admin page could not load, I removed that line, that why you don’t see it.
Yes I see that wp-load.php file, what should I do?

Thank you very much for your help

Hi @michael.descoteaux,

Could you run the following command?

sudo /opt/bitnami/ctlscript.sh restart 

And see if that works if not, could you rerun the bnsupport again?

Regards,
Ibone.

I did not work
I ran the support tool again, here is the code : 24f23970-2593-4835-326e-e4f247b973f5

Hi @michael.descoteaux,

It seems you have some error of permission. Could you please run the command below in order to fix the permissions?

sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Maybe this guide can help you
https://www.youtube.com/watch?list=PLGgVZHi3XQNn4x0DU7Qj1r_inej3xEUda&v=nKfle7O0vN8&feature=emb_title

Regards,
Ibone.

Ibone thank you! I think I have fixed the problem. I can access the wp admin page

But what can I do to prevent this from happening again? I still have to add that line in the wp-config file.

Hi @michael.descoteaux,

that happen normally by installing some plugins, don’t worry about that, you can add that line.
If something change you can follow this guide https://docs.bitnami.com/general/apps/wordpress-production-ready/administration/understand-file-permissions/

And check the logs of Apache https://docs.bitnami.com/bch/apps/wordpress/troubleshooting/debug-errors-apache/

And you can always open a new topic here we try to help you.

Regards,
Ibone.

Hi @Ibone!
Every time I modify wp-config.php I have the same problem, I use these lines to fix it:

sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs

it works but it’s very annoying, is there something I can do?

What are theses lines used for?
sudo find /opt/bitnami/wordpress/htdocs -type d -exec chmod 775 {} ;
sudo find /opt/bitnami/wordpress/htdocs -type f -exec chmod 664 {} ;

Thanks!

Hi @michael.descoteaux,

Could you tell me what method are you using to edit wp-config?

some plugins change the permission of the folder, and these commands are the way to put that right

Regards,
Ibone.

Hi @Ibone
I right-click on the file, open with TextEdit, do the change then save.
Right now I’m trying to migrate my local wordpress to my host and it looks like I can’t because of permissions, I guess I have to type those lines in the Bitnami terminal to fix this?
Thanks!

Hi @michael.descoteaux,

I think the way the file is edited is the reason why permissions change, maybe for the permissions, the editor has or the user.

yes, It seems that will work, if you still have the problem please rerun the bnsupport.

Regards,
Ibone.

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