• Get In Touch

Changing your WordPress Admin Password

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

If you need to change your WordPress admin password but you do not have access to the WordPress admin section, you can change it via either three methods – Softaculous, phpMyAdmin or by editing the WordPress functions.php file.

Change the Password via Softaculous

If you installed your WordPress website via Softaculous, you can change the admin password by editing the installation information.

Log into your cPanel account. If you are unsure on how to do this, please view the following help article – ‘How to log into cPanel‘.

Scroll down to the ‘Softaculous Apps Installer‘ section. Select ‘WordPress‘ from the available scripts list.

Scroll down to the ‘Current Installations section. Where your installation is shown, choose the ‘Edit pencil icon‘.

The installation information will now all be shown. Scroll down to the ‘Admin Account‘ section. Enter your preferred admin username and your new admin password into the respective boxes.

Scroll to the bottom of the page and confirm the WordPress admin password change by selecting ‘Save Installation Details‘.

Your WordPresss admin password has now been changed through Softaculous.


Change the Password via phpMyAdmin

Log into your cPanel account. If you are unsure on how to do this, please view the following help article – ‘How to log into cPanel‘.

Scroll down to the ‘Databases‘ section and choose ‘phpMyAdmin‘.

Once phpMyAdmin has loaded, from the left hand side, you should see your account name. Click on the ‘+’ icon to expand the available databases on your account.

Select your WordPress database.

Select the ‘_users‘ table from the table list.

Locate the ‘admin‘ user record and select the ‘Edit‘ option.

For the ‘user_pass‘ field, choose from the function dropdown menu ‘MD5‘. This will encrypt the plain new text password that you are about to type.

Type in the new admin password into the ‘Value‘ field.

Save the new password change by selecting ‘Go‘ at the bottom.

Your WordPress admin password has now been changed through phpMyAdmin.


Change the Password by editing WordPress functions.php file

You can hardcode the WordPress admin password by editing the functions.php file.

Log into your cPanel account. If you are unsure on how to do this, please view the following help article – ‘How to log into cPanel‘.

In cPanel, scroll down to the ‘Files‘ section and choose ‘File Manager‘.

The file manager has access to all of the files on your server, including your WordPress files which is where we need to edit the wp-config.php file.

Using the left directory listing, open the ‘public_html‘ folder and then click onto the folder that contains your WordPress installation.

Again using the left directory, click to open the ‘wp-includes‘ folder.

Locate the functions.php file in the files listing and mouse click onto it to highlight it.

Choose ‘Edit‘ from the top menu.

Confirm that you would like to edit the file in the text editor by selecting ‘Edit‘.

Add the following line to the top of the functions.php by below the opening <?php tag, replacing the example ‘yournewpassword123’ with something more suitable as your new WordPress admin password.

wp_set_password( 'yournewpassword123', 1 );

Save the changes by selecting the ‘Save Changes‘ option.

Changing by your WordPress admin password by editing the functions.php file is now complete. However please note that once you have access, you may wish to delete the line added to avoid complications in the future.


Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!