How to reset and change a database password for a WordPress site

WordPress makes use of a database for much of its functionality. If you need to update the database password, then the WordPress configuration file also needs to be updated accordingly, or else the website will break fail to resolve. Please follow the steps below to change your WordPress database password. 

You can do this by logging into Thexyz Client Area and making your way to your active services. 

Your WordPress hosting service may be called Managed WordPress Hosting or cPanel Usage Instance. Click on it once located.

Locate WP service

From the management page, click Login to cPanel.

cPanel Login

From the cPanel, locate your MySQL database by clicking on MySQL Databases.

SQL databases

On the next screen, scroll down to where you manage SQL users and locate the MySQL user for your WordPress database. Once you have found the user that is associated with your WordPress database, click Change Password to set a new password. 

Database user

On the next page, you can enter a secure password twice. This password does not need to be entered for access and will really only be used once. It should be a secure, unique, and randomly generated password. Be sure to copy the password to your clipboard before proceeding at you will need to enter it again into your wp-config.php file in the next step. 

Enter password

Now that the password has been set, you should locate your wp-config.php file in the file manager. Go back to cPanel home by clicking on 'thexyz logo' at the top left. Then select File Manager under Files or do a search for File Manager

File Manager

You should next open public_html and locate the wp-config.php, open and edit the file. 

Here will notice some that look like the below picture and you can set your new password between the quotes.

/** MySQL database password */
define('DB_PASSWORD', 'sfdla9083JS89wDMNO82okUwRE#4w98');

Editing wp-config

Save the file and then visit your website to ensure the new password has been entered correctly. If you see an error that there is an issue with connecting to the database, repeat the process to ensure you have entered the password correctly.

  • 123 Users Found This Useful
這篇文章有幫助嗎?

相關文章

Enabling two-factor authentication

Setting up 2-factor authentication (or 2FA) provides a second line of defense. If your password...

Setup SMS password reset for Webmail

Email password resets for Webmail require SMS verification or Multi-Factor Authentication. If you...

Password Help

Here at Thexyz we take your account security very seriously and want to make it easy for you to...

How To Change Your Webmail Password

A strong and secure password is an essential component of protecting your online accounts,...

How to enable DKIM Authentication on your domain

Protect your Email with DKIM (Domain Keys Identified Mail). DKIM adds a secure signature to your...