WordPress MySQL Database Remote Connection

August 5, 2011 | By Duchateaux.

WordPress MySQL Remote DB Connection Set-Up

This Procedure is Particularly Useful when you want to Develop on a Local Machine and after Deploying into the Remote Server.

But this is potential only if your Host Allow MySQL Remote Access.
So before you should need to Check if your Hosting Plan dispose of such Possibility.

This is the Step-by-Step Procedure to Make this Setup.

Wordpress MySQL Database Remote Connection - Featured
  1. Enable MySQL Remote Access
        In CPanel  Databases>>Remote MySQL
        Insert your IP

  2. Check you are able to connect to Database:
         In Unix-like open a Terminal Session

    mysql -u yourMySQLUser -h xxx.xxx.xxx.xxx -p
  3. Change settings in wp-config.php:

    define('DB_HOST', 'xxx.xxx.xxx.xxx:port');


    define('DB_HOST', 'db.domain.com:port');

    You do Not Need to Set the Port if your Connection Use the 3306Default port.

  4. Save and Test your Setup :)

QuickChic Theme • Powered by WordPress