I took over a website's administration from another person. Site was not updated a long time and all I got was the password for the wp-login page. I did some updates to the site, but stupidly, changed the URL of the site (inside wp-admin, general settings) just to test it . Now the site does not work. Neither does the wp-admin. When I put my credentials, it takes me to the "new" URL (WRONG-URL/wp-login.php), which naturally does not work.

Online I found two suggestions.

  1. FTP.

I tried accessing through the FTP but get the error below. I tried many google answers but none worked (particularly disabling firewall).

enter image description here

  1. cpanel.

I tried to log in through the cpanel, but the password does not work and recovery email is not recognize by previous admin (site was created long long ago and probably only managed through WP).

How can I regain access to the site? Perhaps contacting the hosting company directly and ask them to restart the server, as suggested here?

  • How did you "change the URL" ?
    – Q Studio
    Jan 12, 2021 at 20:27
  • @QStudio inside wp-admin, general settings. Jan 12, 2021 at 20:27
  • You have to contact hosting and get access to the database so you can manually revert the URL in the options table. Jan 12, 2021 at 21:20
  • @TonyDjukic Yes, will try that now, thanks. Jan 12, 2021 at 21:32

1 Answer 1


You need to get access to the database ( and for this you need cpanel access probably ) - commonly, this is via PHPMYADMIN, most hosts have it and then you need to go to the wp_options table and find two references, these are normally on the first and second page of rows - they are:

site_url & home_url

Both should show the new URL you changed the site to - you can edit them to what you want.

As a work around if you have working FTP access, these values can also be hard coded into the wp-config.php file, in the root of the WordPress install - using the two following CONSTANTS:

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

Read more about how here: https://wordpress.org/support/article/changing-the-site-url/#edit-wp-config-php

  • Thanks! Just had a go at installing PHPMYADMIN and I'm lost at instructions. Do I need extra information or with all I know from wp-admin is enough to configure it? Jan 12, 2021 at 21:19
  • Where are you installing it? This needs to be on the host machine where the website is - you will then need the login details to the database - these will be in the wp-config.php file.. which you could get if you have FTP access..
    – Q Studio
    Jan 12, 2021 at 21:22
  • In my local machine. Host machine is somewhere else. I do not host the site. Nor have I access to FTP. Jan 12, 2021 at 21:24
  • did you change the URL on your local machine? PHPMYADMIN will only give access to databases on the same machine..
    – Q Studio
    Jan 12, 2021 at 21:25
  • I change it though my-site.com/wp-admin. So I imagine I did not. The hosting hasn't changed. It's a company somewhere. I only received the credentials to log in to WP. Jan 12, 2021 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.