由于URL(WP和站点)的更改而无法访问WordPress中的子页面 [英] Can't access subpages in WordPress due to change of url (WP and site)

查看:218
本文介绍了由于URL(WP和站点)的更改而无法访问WordPress中的子页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以访问我的WordPress网站和主页,但仍然无法访问子页面,上面写着对不起!您无权访问此网站!'。

I have access to my WordPress site and the homepage, but I still can't access the subpages, it says 'Sorry! You're not Authorized to access this website!'.

我已经执行了以下步骤:

I've already done the following steps:


  1. 在主题的函数中粘贴了以下内容。php

  1. Pasted the following in the theme's functions.php

update_option('siteurl','https: //yourpageserver.com/acolade-demo/');
update_option(家, https://yourpageserver.com/acolade-demo/);
全局$ wp_rewrite; $ wp_rewrite-> flush_rules();

完成此操作后,我可以重新访问WordPress,因此我从我的functions.php中删除了代码。我现在不知道自己无法访问这些子页面。

After doing this, I've got my access back for my WordPress, so I removed the codes from my functions.php. I wasn't aware that I have no access for the subpages at this moment.

看到子页面上没有访问权限后,我尝试了将这些代码粘贴回去,但仍然没有成功。.

After seeing that I've got no access on the subpages, I tried to paste those codes back, but still no success..

我一直在网上寻找帮助数小时。请帮忙。

I have been searching the net for help for hours. Please help..

推荐答案

我的问题已解决。我重命名了包含wordpress文件的文件夹,然后还更改了WP-ADMIN>设置>常规中的URL。此时,我再次取消了访问权限,因此将这些代码粘贴回去:

My problem is fixed. I renamed my folder containing the wordpress files, then I also changed the urls in WP-ADMIN > SETTINGS > GENERAL. At this point I got my access removed again, so I pasted these codes back:

update_option('siteurl','https:// yourpageserver .com / accolade-demo /');
update_option('home','https://yourpageserver.com/accolade-demo/');

注意该链接现在为'accolade-demo',因为这应该是正确的链接和名称。现在我可以访问包括子页面了。

Notice that the link is now 'accolade-demo' because this should be the correct link and name. Now I've got my access back including the subpages.

这篇关于由于URL(WP和站点)的更改而无法访问WordPress中的子页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆