-3

I have changed the Site URL and Home URL of my website, after that I am not able to access it. The message appearing on the screen is "this site can’t be reached"

How do I get the access back?

closed as off-topic by Jacob Peattie, mmm, bosco, Mayeenul Islam, Jack Johansson Aug 1 '18 at 1:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Jacob Peattie, Jack Johansson
If this question can be reworded to fit the rules in the help center, please edit the question.

1

If you have a cPanel and have an access of phpMyAdmin on your host, then find your DB, check the "siteurl" and "home" fields are correct in wp_options Table.

Or

Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.

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

Or

If you have a cli access, then login into your Mysql, select a database and run below query

UPDATE wp_options SET option_value = replace( option_value, 'http://oldsite.com/path', 'http://spankingnew.com/otherpath' )
WHERE option_name = 'home' OR option_name = 'siteurl';

(NOTE: make sure to change 'http://oldsite.com/path' with your correct URL and 'http://spankingnew.com/otherpath' with your edited URL in the query)

  • unfortunately i don't have any access on my phpMyAdmin or cli access – Mona Kandil Jul 29 '18 at 4:55
  • which web hosting are you using? – JayTh Jul 29 '18 at 21:00
  • i used the free one (000webhost) – Mona Kandil Jul 30 '18 at 5:47

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