WordPress

How to add WordPress Administrator using PHP

Sometimes you are catch in this situation: client just sent you FTP access to the site but no WordPress password/user info at all. What to do? Since you have FTP access, you can do anything you’ll like and I will show you how to do that.

First of all, login to the site via FTP and find index.php file in the root directory of the WordPress installation.

Go to the very end of the file and write down something like this:

Now, simply run this site, by entering its url in the browser. Be sure to remove those lines after that! Now you can get into /wp-admin and login using cute_user as a login and this-is-my-password as a password. Of course you should use your own data.

Leave a Reply

Your email address will not be published. Required fields are marked *