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.
- FTP.
I tried accessing through the FTP but get the error below. I tried many google answers but none worked (particularly disabling firewall).
- 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?
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.
- FTP.
I tried accessing through the FTP but get the error below. I tried many google answers but none worked (particularly disabling firewall).
- 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?
Share Improve this question edited Jan 12, 2021 at 20:28 elpadreroberto asked Jan 12, 2021 at 20:23 elpadrerobertoelpadreroberto 11 bronze badge 4- How did you "change the URL" ? – Q Studio Commented Jan 12, 2021 at 20:27
- @QStudio inside wp-admin, general settings. – elpadreroberto Commented 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. – Tony Djukic Commented Jan 12, 2021 at 21:20
- @TonyDjukic Yes, will try that now, thanks. – elpadreroberto Commented Jan 12, 2021 at 21:32
1 Answer
Reset to default 0You 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' );
define( 'WP_SITEURL', 'http://example' );
Read more about how here: https://wordpress/support/article/changing-the-site-url/#edit-wp-config-php