Home > how-to, wordpress > How to change the MySQL database password of WordPress

How to change the MySQL database password of WordPress

August 23rd, 2009

Today I decided to do some maintenance tasks on this site which is a WordPress blog hosted on Webfaction.com.

Here are the steps how to change the MySQL database password of WordPress in Webfaction.com:

  1. Login to your Webfaction control panel.
  2. Goto Databases->Change database password.
  3. Select the MySQL database from the database list.
  4. Type in the new MySQL database password
  5. Click the Change button

However, you also need to tell WordPress to use the new MySQL database password or you will get this nasty error when you try to access your WordPress site:

“Error establishing a database connection”


To fix that, you need to:

  1. edit wp-config.php on your WordPress site
  2. look for the line with
    define('DB_PASSWORD', '[your password]');
  3. change [your password] to your WordPress’ MySQL database password
  4. save wp-config.php
  5. visit your WordPress site

Your WordPress site should now be able to login to it’s MySQL database.

This how-to applies to a WordPress site using MySQL as database hosted on Webfaction.com.

Author: Cyril Pauya Categories: how-to, wordpress Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.