Expert Group of programming

WordPress installation | WordPress and database on different Server

Posted by : Heycode Tech | Posted in : wordpress, WordPress Installation | Dec 1,2015 | 0 comments

I have received an email regarding the WordPress installation with different SERVER i.e WordPress files on one SERVER and DATABASE on another SERVER.

For installing the WordPress, please visit the blog – WordPress installation Guide

WordPress and Database on different SERVER

For installing the wordpress with different DATABASE server,You need to do the settings on the WordPress files as well as MYSQL configuration files.Now by default,it has the localhost, but now you need to change it.

Follow the some easy steps.

i ) – Open the file : wp-config.php : and fillup the required information.

// ** MySQL settings - You can get this info from your web host ** //

/** The name of the database for WordPress */
define('DB_NAME', 'db_example');

/** MySQL database username */
define('DB_USER', 'db_user');

/** MySQL database password */

/** MySQL hostname : Change- localhost to ip (xx.xx.xx.xx) of another SERVER ***/
define('DB_HOST', 'xx.xx.xx.xx');

You need to provide the -Database Name,UserName,password and HostName of another Server where you need to install Database.

ii): Login the MYSQL SERVER database and done the Setting of – BIND ADDRESS : of file : my.cnf : with location –

  Path : /etc/mysql/my.cnf

Here is the screenshots.

Screenshot from 2015-12-01 12:38:25

For binding address

Screenshot from 2015-12-01 12:36:32

You need to change the bind address.

Change :  : to : : for available/access to all IP.

If you need any difficulties then please share with me.

Conclusion :
Hope so it will help for installing the wordpress with different database SERVER but still if you have any query then please share with me .


Author information - Heycode Tech

Every world can ask question and my website registered user give the suggestion.

See all posts by Author

Connect to author

Leave a Reply

Your email address will not be published. Required fields are marked *

About us

Heycodetech is a platform where you can ask any questions related to the programming like PHP,jQuery, MYSQL,HTML , CSS and more Here is the Expert group of programming.