This article explains how to change the password for a WordPress database on Shared and VPS hosting accounts. If your website is hosted on Managed WordPress or Podcast Websites, the steps are different. For instructions, see Changing a WordPress Database Password on Managed WordPress and Podcast Websites.
There are two main steps:
Both steps must be completed to ensure WordPress can connect to the database.
Step 1: Find Your Database Information
In order to change your database password, you’ll need to identify which database your WordPress installation is using. If you already know your database details, you can skip to Step 2: Change the Database password.
- Open your WordPress installation’s wp-config.php file, which is often located in:
usr/home/YOUR_USER/public_html/YOUR_WORDPRESS_WEBSITE - Locate the following lines:
define( 'DB_NAME', 'database_name' ); - Make a note of the database name
Step 2: Change the Database Password
- Follow the steps in Changing an ACC Database Password
- Return to this article once the database password has been changed
Step 3: Update the WordPress Configuration File
- Open the site’s wp-config.php file using the file manager in the ACC or an FTP client
- Locate the following line:
define( 'DB_PASSWORD', 'old_password' ); - Replace the existing password with the new password
define( 'DB_PASSWORD', 'new_password' ); - Save the file.
Step 4: Verify Your Site
Make sure your website is still running normally after the update.
- Visit your WordPress website
- Log into the WordPress admin area
- Confirm pages load normally and site functions as expected