Error establishing a database connection Amazon EC2 - after moving my wordpress blog

后端 未结 13 1959
無奈伤痛
無奈伤痛 2021-02-01 09:03

I am getting the error: \"error establishing a database connection\" after moving my wordpress blog to Amazon EC2. I\'ve checked the wp-config.php file and settings are ok (loca

13条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-01 09:46

    You did not indicate whether you are moving your blog from myolddomain.com to mynewdomain.com, and whether you are using normal WordPress or multi-site WordPress. But here are some tips that might help:

    • First, you need to make sure your wp-config.php is configured correctly (database server, username, password...)

    • Secondly, WordPress uses database to store some information about the current host, look at tables wp_site, wp_options,wp_sitemeta and replace all rows containing myolddomain.com by mynewdomain.com.

    • Make sure your EC2 security group is configured correctly.

    This article might help, too.

提交回复
热议问题