I'm usually able to set this up very easily.
In my local wp-config.php file I just add the following lines:
define('WP_HOME','');
define('WP_SITEURL','');
define('LIVE_SITEURL', '');
Trying to set this up with a live Ubuntu server, I'm running into issues where I get a database error connection after a long wait time.
I have also edited the bind-address directive in my /etc/mysql/mysql.conf.d/mysqldf
Is there anything else I should be looking out for with my local setup?
Thanks
Edit: also as require, I change the DB_HOST line to:
define( 'DB_HOST', 'remote.ip.here.yeah' );
I'm usually able to set this up very easily.
In my local wp-config.php file I just add the following lines:
define('WP_HOME','http://example.local');
define('WP_SITEURL','http://example.local');
define('LIVE_SITEURL', 'http://example');
Trying to set this up with a live Ubuntu server, I'm running into issues where I get a database error connection after a long wait time.
I have also edited the bind-address directive in my /etc/mysql/mysql.conf.d/mysqld.cnf
Is there anything else I should be looking out for with my local setup?
Thanks
Edit: also as require, I change the DB_HOST line to:
define( 'DB_HOST', 'remote.ip.here.yeah' );
Share
Improve this question
edited May 3, 2019 at 20:01
Best Dev Tutorials
asked May 3, 2019 at 19:16
Best Dev TutorialsBest Dev Tutorials
4451 gold badge7 silver badges21 bronze badges
7
|
Show 2 more comments
1 Answer
Reset to default 2It looks like you're connecting to the live database from your local machine. Not many hosts allow remote connections to the database by default. You may have to request this type of access from your host.
Also, it's highly recommended you work with a local copy of your database instead of connecting (and possibly changing) your live database.
By the way, I've never seen LIVE_SITEURL
, either.
LIVE_SITEURL
parameter come from? I can find no documentation on it. Usually local development happens with a local copy of the database – Tom J Nowell ♦ Commented May 3, 2019 at 19:28