admin管理员组

文章数量:1435853

Closed. This question is off-topic. It is not currently accepting answers.

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?

Closed 6 years ago.

Improve this question

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. This question is off-topic. It is not currently accepting answers.

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?

Closed 6 years ago.

Improve this question

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?

Share Improve this question edited Mar 28, 2019 at 19:33 JayTh 235 bronze badges asked Jul 26, 2018 at 12:20 Mona KandilMona Kandil 51 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 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" is the correct location of your site.

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

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/path', 'http://spankingnew/otherpath' )
WHERE option_name = 'home' OR option_name = 'siteurl';

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

本文标签: url rewritingLost WordPress website access after changing URL