WordPress Website with Remote MySQL Database
The Tip Simply Shows How to Set-Up WordPress with MySQL Database on a Remote Server.
First, Step Involved is to Grant Remote Access to the Database for the WordPress MySQL User…
-
Granting MySQL Remote Access.
-
By CPanel: go Databases >> Remote MySQL Authorize your IP
-
How to Grant MySQL User Remote Access on Shell
-
-
Edit wp-config.php.
For example with the nano editor:
sudo nano wp-config.php
Set up:
define('DB_HOST', '16.32.64.128:port');
Or
define('DB_HOST', 'db.domain.com:port');
Ctrl+x to Save & Exit from nano Editor :)
(The ‘:port’ Parameter it is Not Needed if MySQL use the Default port: 3306)