I would like to develope locally meanwhile using a wp remote database.

I've been searching for a long time in google and trying some configurations (wp-config.php) without success.

I achieve to make it work, but without satisfaction (I have looping redirection, revolution slider not working, etc)

I customize this values, and get the remote connection, but maybe there is something about the server path that needs to be configured ¿?:

define('DB_NAME', 'db_name'); // remote
define('DB_USER', 'db_user'); // remote
define('DB_PASSWORD', '123456'); // remote
define('DB_HOST', 'xxx.yyy.com'); // remote

define('WP_HOME','www.aaa.dev'); // local
define('WP_SITEURL','www.aaa.dev'); // local

Thank you very much for your attention, I would like to know if someone have done this set up.

PD: I already try this here: Connect to remote database using Localhost install

1 Answer 1


In most cases, the database server is not open to remote connections by default, meaning that you can connect to it locally (web server and database server are on the same machine). By default, MySQL is binding to the localhost or Here is one tutorial on how to grant remote access to specific IP and user account: Enable Remote Access for MySQL.

  • I have the IP exception in the remote database, no problem connecting with the DB.
    – Dedalos01
    Commented Sep 7, 2017 at 10:35
  • 1
    Why do you set the WP_HOME or WP_SITEURL via wp-config.php? WordPress settings and wp_options table already have settings for these. If you have redirection loop, most likely problem is conflicting URL somewhere. Commented Sep 8, 2017 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.