url rewriting - Lost WordPress website access after changing URL

Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as synt

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)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745648472a4638114.html

相关推荐

  • url rewriting - Lost WordPress website access after changing URL

    Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as synt

    22天前
    70

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信