close
adminuserftp

If you are locked out of your admin it can leave your frustrated. Users have enquired about if it is possible to add an admin user in the WordPress using FTP. In this article we will show you exactly that.

Why You May Need to Add an Admin User in WordPress Using FTP?

The main reason being at time you might forget the username and password, then you’ll simply be unable to log into the admin area.

One way to do this is by adding an admin user to the WordPress database usingMySQL. But you may be unable to connect to phpMyAdmin or don’t want to run MySQL queries directly.

Some users may get their site hacked and admin account deleted. In that case, adding an admin user using FTP can quickly restore your access to the WordPress admin area.

Having said that, let’s see how you can easily add an admin user in WordPress using FTP access.

Adding an Admin User in WordPress Using FTP

First you need is an FTP client. Once connected to your WordPress site, you need to locate your WordPress theme’s functions.php file. It would be at a like this:

/yoursite.com/wp-content/themes/your-current-theme/functions.php

Right click on functions.php file and then select download. Your FTP client will download the functions.php file to your computer.

ftp-download

Open the file you just downloaded on your computer using a plain text editor like Notepad. Now you need to add this code at the bottom of the file.

Screenshot (2)

Don’t forget to replace Username, Password, and email@domain.com with your own values.

Next, save the file and then upload it back to your website using the FTP client.

You can now visit your WordPress site’s login area and sign in with the user account you just added.

Once you have logged in to your WordPress site, please edit the functions.php file and delete the code you added. Deleting the code will not remove the user you added, and you can always add new users and authors to your WordPress site.

 

Tags : wordpressWordPress how to
Nooruddin Ahmed

The author Nooruddin Ahmed

An avid football fan. Lives for the weekend game.Aviation enthusiast. Believes in letting bygones be bygones.

Leave a Response