• Dear all,

    Yesterday, I tried to connect my WordPress website to a different database. This database is a remote one.

    To achieve this, I opened the wp-config.php file and started modifying the database settings. I entered the domain name (which I extracted from the URL of the remote database) for the DB_HOST setting. I also modified the DB_NAME, DB_PASSWORD settings etc. Then I saved the file and exited from the website.

    After some time, when I tried to open the WordPress admin dashboard again, the loading became very, very slow. Finally it ended up showing the message ‘504 Gateway Time-out’. I have tried many times since then and still couldn’t get back into the dashboard.

    Can anybody advise how to fix this?

    Thank you very much in advance.
    Salesian

    • This topic was modified 1 year, 5 months ago by salesian.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Does the external db server allow remote connections to the port you’re trying to connect to? Are you using a VPS?

    Why don’t you just go back into your wp-config.php file and change all the database strings back to the original settings?

    Thread Starter salesian

    (@salesian)

    I don’t think I’m using a VPS, since I don’t know what it is.

    As mentioned previously, I do not have access to the admin dashboard anymore (I only got a message: 504 Gateway Time-out), therefore I cannot perform any edits with wp-config.php.

    All this happened after I entered the domain name for the DB_HOST setting.
    The domain name looks like this: phpstack-3016-641.loudway.com:8082

    • This reply was modified 1 year, 5 months ago by salesian.

    There is a lot of configuration to complete before you can connect to a remote db.

    To edit your config file, just login to your host and use the File Manage to navigate to your wp-config.php file.

    Or you could also use FTP.

    See here:

    https://www.wpbeginner.com/beginners-guide/how-to-edit-wp-config-php-file-in-wordpress/

    or here:

    https://www.namecheap.com/support/knowledgebase/article.aspx/9892/2187/how-to-edit-wpconfigphp-file-in-wordpress/

    Thread Starter salesian

    (@salesian)

    Thank you for the links. However, those 2 tutorials you shared talked about many things, not simply database settings. The respective sections in those 2 tutorials talk little about database settings, I couldn’t find a lot of configurations to complete before connecting to a remote database.

    The links I provided to you are specifically for you to be able to update your config file so that you can login to your WordPress. They are not to configure your remote db.

    As I said, you need to configure the remote db, and the remote db server in order to make a remote connection. It needs more authorization than simply a username and password.

    This is outside of WordPress, and not really a WordPress issue. Talk to the support techs at the host where your db exists in order to allow remote connections.

    im assuming your remote db is an instance of WordPress?

    What are you trying to achieve?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Connecting to Remote Database’ is closed to new replies.