My website keeps redirecting in multisite

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: fa7c5f8f-3821-ecc7-79ce-892f7c008d2f
After I had added the multisite configuration in the wp-config, the website keeps redirecting and I can’t access my wp admin network or the other sites. Please I need a fix. I am frustrated.

Hello @apexzy,

I have found several errors in your support tool output. I explain them in order from most important to less relevant for your issue:

  1. When accessing your IP I receive Error establishing a database connection. It seems like WordPress can’t reach out to the database. Can you please check that you have access to it? You should be able to access with the credentials in wp-config.php (DB_USER and DB_PASSWORD). Here you have a guide that shows how you can connect:

error 'PHP message: Unable to open /opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/config-synced.php for reading and writing.'

This seems to be a permissions error. In order to set the default permissions, you should follow this guide:

  1. The Apache configuration has errors:
AH00526: Syntax error on line 41 of /opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf:
RewriteBase: only valid in per-directory config files

You need to remove the 3 latest lines

RewriteEngine On                                                                                                                                             
RewriteBase /                                                                                                                                                 RewriteRule ^index.php$ - [L]
  1. The WordPress domain does not seem to be configured. Please check the following guide:

5.Found recent WordPress plugin-related error messages in the Apache error log.Please check the following guide to deactivate plugins:

  1. The following error appears in the /opt/bitnami/php/var/log/php-fpm.log
WARNING: [pool www] server reached max_children setting (5), consider raising it

This error usually indicates PHP script execution is slow due to busy server resouces or buggy scripts. Please check the following guide on how to increase the memory limit:

Hi Davidg,

I’ve done all and the only thing I can’t get right is why I cannot connect to the database using the command.

sudo cat /opt/bitnami/apps/wordpress/wp-config.php | grep ‘DB_HOST’

I event replaced “DB_HOST” with my Database Host, yet can’t connect and I get “No such file or directory” error.

What next?

I ran the first command this way:

sudo cat /opt/bitnami/apps/wordpress/htdocs//wp-config.php | grep 'DB_HOST'

And the output is as follows:

define( 'DB_HOST', 'localhost:3306' );

What next?

I have finally got the MySQL to start running.

bitnami@ip-172-31-30-119:~$ sudo /opt/bitnami/ restart

Syntax OK
/opt/bitnami/apache2/scripts/ : httpd stopped
/opt/bitnami/php/scripts/ : php-fpm stopped
/opt/bitnami/mysql/scripts/ : mysql stopped
/opt/bitnami/mysql/scripts/ : mysql started at port 3306
/opt/bitnami/php/scripts/ : php-fpm started
Syntax OK

But the problems now remain. The website still shows:

Error establishing a database connection

Now, I don’t know what to do. So here is the updated error log from the Bitnami Support Tool:


Also note, I am using the AWS Bitnami Stack. And I have stopped and even reboot my instance, yet to no avail. I’ll appreciate this issue fixed.

I thought that once the MySQL began to run on the port, my issues would have been resolved, but it’s not.

Thank You

Hello @apexzy,

I can see that MySQL is running, but my question was if you are able to access MySQL with the credentials in `wp-config.php. You could try these commands to check that:

sudo su
sudo /opt/bitnami/mysql/bin/mysql -u$(cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep DB_USER | awk '{ print $3}') -p$(cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep DB_PASS | awk '{ print $3}' | sed "s/'//g") bitnami_wordpress

If that does not work, it means that the credentials in your /opt/bitnami/apps/wordpress/htdocs/wp-config.php are not correct. Then, you would need to access MySQL console as root and execute the following commands:

  mysql> create user 'USER_NAME'@'localhost' identified by 'PASSWORD';
  mysql> grant all privileges on DATABASE_NAME.* TO 'USER_NAME'@'localhost';

where USER_NAME and PASSWORD are placeholders that need to be updated with the correct values. Then, change the values in your /opt/bitnami/apps/wordpress/htdocs/wp-config.php file.


Hi, thanks for the response. But when I runt the commands, I the following output:

mysql.bin: [Warning] World-writable config file '/opt/bitnami/mysql/my.cnf' is ignored.

What could be wrong and what is the way out?

Thank you for following up.

I tried again after some commands and this is what I get when I run the second command:

Last login: Thu Apr 29 13:18:03 2021 from

bitnami@ip-172-31-30-119:~$ sudo su
root@ip-172-31-30-119:/home/bitnami# sudo /opt/bitnami/mysql/bin/mysql -u$(cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep DB_USER | awk ‘{ print $3}’) -p$(cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep DB_PASS | awk ‘{ print $3}’ | sed “s/’//g”) bitnami_wordpress
mysql.bin: [Warning] World-writable config file ‘/opt/bitnami/mysql/bitnami/my.cnf’ is ignored.
mysql.bin: [Warning] Using a password on the command line interface can be insecure.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.22 MySQL Community Server - GPL

Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


Now, when I run the MySQL create user command, I get this:

mysql> create user 'ehubber_devops'@'localhost' identified by '18854a16';       ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation

Which is frustrating, and yet I am trying to act normal.

Here is the support tool code, this is a recent version after I had tried your instructions:


Please @davidg, I’ll appreciate it if you give me a top priority. And it seems that Bitnami Multisite installation keeps redirecting even when you install it newly. I figured this out because I had launched another instance with my backup and yet, the issue keeps lingering.

The whole issue started when I added the multisite functions in the wp-config, now I am misearable. Please, help.

Here is the latest support tool code:


At this point, I am frustrated and drenched.

Hi @apexzy,

The database credentials configured in the wp-config.php seems to be working fine as you got the MySQL prompt (mysql >). However, this user can’t create another users into MySQL, and that’s the error message you are getting. Why do you want to create another database user?

I see some errors related to the WordPress database in the Apache logs. Did you modify anything on your website? Did you remove any database manually?

Apart from answering the questions above, can you ask in the official WordPress forums for further help on how to debug these connectivity errors?

No I didn’t modify any file. I even installed a new instance that’s a multisite image from bitnami. Yet the issue happens even in a new installation.

Hi @davidg,

This has been a crazy and yet frustrating time for you. I really do appreciate your time and effort in answering and putting me through.

So far, today, I installed a new instance and restored my backup.

Thus, the site is running as I have configured certain things.

However, the major issue now is I can’t access the wp-admin network dashboard.

Here’s the support tool recent code I ran:


This is the link for the Multisite Admin Network Dashboard;

It keeps redirecting. What can be done?

Thanks for the response in advance.

BTW, the WordPress community couldn’t actually help.

Hi @apexzy,

Please find my comments inline.

When I visit your link above all I get is a maintenance page. Can you disable it? I think it is preventing you to visit the admin panel as well. However, this is not related to your database connectivity error, right?

BTW, the WordPress community couldn’t actually help.

Can you share with us the link to your question? I really think they must be able to provide you with help on how to debug the WordPress and MySQL connectivity.

Apart from that, I think I found an issue on your wp-config.php. When the bnsupport tool tries to run the wp-cli tool, it is finishing with the next error

Error: Error: Site '' not found. Verify DOMAIN_CURRENT_SITE matches an existing site or use `--url=<url>` to override.
Exitcode: 1

Can you set the value in the config file to the one below?