Update WordPress database connection string

If your WordPress site is out of sync with your database and displays the following error: "Error Connecting to the Database", you'll need to update the connection strings on your WordPress site.

  1. You should always backup your site before performing any troubleshooting.
  2. Locate your database details. (cPanel / Plesk / Web Hosting / Managed WordPress).
  3. Edit the wp-config.php for your website. (cPanel / Plesk / Web Hosting / Managed WordPress / VPS)
  4. In wp-config.php file, locate the section that looks like this example:
    /** The name of the database for WordPress */
    define('DB_NAME', 'yourdatabasename');
    /** MySQL database username */
    define('DB_USER', 'yourusername');
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpassword');
    /** MySQL hostname */
    define('DB_HOST', 'yourhostname');
    
    $table_prefix  = 'yourtableprefix';
  5. Confirm the information in this file matches the database details you found earlier.
    • Replace yourdatabasename with your MySQL Database Name
    • Replace yourusername with your MySQL User Name
    • Replace yourpassword with your MySQL password
    • Replace yourhostname with your MySQL Host Name
    • Replace yourtableprefix with your Table Prefix
  6. If any of the information in the wp-config.php file doesn't match your database details, then update the file with the correct information.
  7. Save the updated file.
  8. Check your website to verify it's back online.

More info

More info about WPPS.

이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.