How To Add An Admin User in Wordpress Using Functions PHP File
How To Add An Admin User in Wordpress Using Functions PHP File
HOME
WORDPRESS HOW TO ADD AN ADMIN USER IN WORDPRESS USING FUNCTIONS PHP FILE?
FOLLOW US
Stay updated via social channels
CATEGORIES
How To
Admin users of WordPress have full control of the website and all the
capabilities and can access everything in the admin area. So in case, you want Laravel
to add an admin user in WordPress with a code, then you have to write the code PHP
in the functions.php file.
ReactJS
So, in this article, we will learn how to add an admin user in WordPress using WooCommerce
(Functions.php file)
How to Redirect to
2
Add an Admin User in WordPress Using functions.php file (With FTP) Checkout After Add to
Cart?
3
Add an Admin User in WordPress (With cPanel) October 16, 2020
When you forget the username/email address and password, and if your site
hacked and you are not able to login to the admin dashboard, then you may
need to add a new admin user using code in the functions.php file. TIPS & TRICKS
WooCommerce Redirect to
You can also use phpMyAdmin to add an admin user to WordPress using SQL Checkout
query with have database access. But if you may not familiar with the database
How to Remove the WordPress
and afraid to run SQL queries directly in the database. Login Error Shake Effect
To add an admin user in WordPress, you need an FTP (File Transfer Protocol)
client-server on your computer. You can use FileZilla OR Cyberduck.
OK. Let’s connect to the website through FTP credentials. When you are
connected and able to see your website files. You will see the screen below.
Then move on to your active theme’s functions.php file by visit the following
path.
/root/wp-content/themes/your-active-theme/functions.php
I’ll suggest you use a child theme to add the custom code. Here are step by
step guide on how to create a WordPress child theme
And here you will see the functions.php file. To edit this functions.php file with
right-click on it and then click the View/Edit option. It will open the file in the
editor and you can edit it now.
When the file opened in the editor, you have to add a custom function code at
bottom of the file. So add the below code in your theme’s functions.php file and
save it and upload it through FTP.
The above code will execute when finished the loading of your website from the
frontend.
We used the init action hook for this. You can read more about init
here.
Now visit the WordPress admin login page and sign with the username and
password that you have just created. You will see, you can log in to the admin
dashboard area now.
OK. Now open your functions.php file again and remove that function from the
file.
NOTE: Don’t worry. It will not remove the user from the WordPress that you have
just added.
For this method, you must have cPanel access to edit the file of your website.
To add an admin user in WordPress using cPanel, follow the below steps:
Right click on the functions.php file and click on the Edit option
It will open the file in edit mode and you can add the above function in this
file at bottom
That’s it
Hope you understand this article about how to add an admin user in WordPress
using functions php file. If you still have any questions, you can ask me in the
comment section, I’ll help you with that.
ADD USER WITH FTP ADD WORDPRESS ADMIN USER ADMIN FTP FUNCTIONS FILE
FUNCTIONS.PHP PHP FUNCTION WORDPRESS WORDPRESS ADMIN
WORDPRESS ADMIN USER WORDPRESS USER
Tweet on Twitter
Share on Facebook
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Save my name, email, and website in this browser for the next time I comment.
POST COMMENT
Your Blog Coach is the best site Blog How to Re-Order WordPress
Name
for finding the solution to any Posts By Custom Field?
WordPress
issue related to coding and learn
How to Add Title Attribute in Your email address
more cool stuff and tricks. WooCommerce
WordPress Menu?
Contact
How to Add an Admin User in SIGN UP
WordPress Using Functions PHP
File?