admin管理员组文章数量:1430479
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.
本文标签: local installationWorking on live sites locally
版权声明:本文标题:local installation - Working on live sites locally 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745525977a2661837.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
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