如何从cPanel登台URL访问WordPress主页 [英] How to access the home page of WordPress from a cPanel staging URL

查看:70
本文介绍了如何从cPanel登台URL访问WordPress主页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个cPanel托管程序包,登台URL的格式为: https://cpanelserver.com/〜cpaneluserid/.

这确实将我带到了WordPress网站.但是,它将我带到WordPress页面哦,不!此页面没有显示任何内容!".

很明显,WordPress不能将登台URL的/〜cpaneluserid/部分识别为有效的页面名称.

如果我尝试添加这样的内部页面名称: https://cpanelserver.com/〜cpaneluserid/about-us/,我仍然收到哦,不"无法识别的页面错误.

如果我尝试从网址中删除cpanel用户ID,则无法访问我的网站,如下所示: https://cpanelserver.com/或像这样删除tilda: https://cpanelserver.com/cpaneluserid/.

任何人都可以使用具有相同URL格式的cPanel托管在WordPress网站上使用登台URL吗?

更新:

因为我的cPanel登台URL"将用户ID作为子目录,如此格式: https://cpanelserver.com/~cpaneluserid/表示没有WordPress网站的人将无法使用这种暂存URL格式.那是因为WordPress将/〜cpaneluserid/解释为页面名称.

并且尝试从该无效页面(没有内容的页面)导航不起作用,因为此编码:<?php bloginfo('url');?> 始终返回 https://cpanelserver.com/~cpaneluserid/,因此新页面链接将为您提供以下URL: https://cpanelserver.com/~cpaneluserid/newpage/,将新页"显示为该无效页〜cpaneluserid"的子目录.

相反,托管公司应使用用户ID作为子域创建登台URL,格式如下: https://cpaneluserid.cpanelserver.com/.

我刚刚收到托管公司的来信,他们有这个借口:"不幸的是,由于cPanel平台上我们没有提供登台URL与其相关的潜在安全风险的数量."

因此,基本上没有人在cPanel托管软件包上拥有WordPress网站,就可以在他们上线之前向他们的客户展示他们的网站设计,以获得他们的批准.

我不确定托管公司为什么会认为该网址: https://cpanelserver.com/~cpaneluserid/的风险要低于此风险: https://cpaneluserid.cpanelserver.com/?

因此,该帖子似乎没有答案.

但是现在我很好奇其他cPanel托管公司如何应对具有有效登台URL的安全风险" ..还是它们都使用与我相同的格式?

解决方案

我终于解决了这个问题.

事实证明这是cPanel用户的一个新手错误!

我已将 cPanel服务器名称用于 WP_HOME WP_SITEURL WordPress设置(即: https://cpanelserver.com/),并将此后的所有内容都视为页面名称(即:/〜cpaneluserid/).

因此,当我使用 https://cpanelserver.com/~cpaneluserid/时.要在线查看网站,cPanel托管软件包正确地将我带到了我网站的根目录,但是WordPress并未将我带到主页,而是将我带到了不存在的/〜cpaneluserid/.页面.

如果我在WP设置中弄错了服务器名称,那么我将无法看到我的站点,并且会立即知道这是我的问题,并且会早日发现此问题./p>

但是由于我的服务器名称正确(即使url不完整),所以我能够查看我的网站,并且知道数据库是正确的..因此我错误地认为我的WordPress设置也是正确的.相反,我当时认为页面演示和cPanels临时URL格式有问题的导航问题.

因此,如果每个人都遇到相同的问题,我想在这里进行记录.

如果您正在使用cPanel的登台(或临时)URL进行访问您的网站上线之前,请务必使用完整的网址指向您的cpanel托管程序包-其中应包括您的cPanel用户ID,如: WP_HOME WP_SITEURL 的WordPress设置.

I have a cPanel hosting package, and the staging url is this format: https://cpanelserver.com/~cpaneluserid/.

This does take me to my WordPress site. However, it takes me to the WordPress page "Oh no! No content is appearing for this page!".

Obviously the /~cpaneluserid/ part of the staging url is not recognized by WordPress as a valid page name.

If I try to tack on an interior page name like this: https://cpanelserver.com/~cpaneluserid/about-us/, I still get an "oh no" unrecognized page error.

I don't reach my website if I try removing the the cpanel userid from the url like this: https://cpanelserver.com/ or remove the tilda like this: https://cpanelserver.com/cpaneluserid/.

Has anyone been able to use a staging URL with a WordPress website from cPanel hosting with this same URL format?

UPDATE:

Because my cPanel 'staging URL' has the user-id as a sub-directory, as in this format: https://cpanelserver.com/~cpaneluserid/, that means that no one with a WordPress site will be able to use this staging URL format.  That is because WordPress interprets the /~cpaneluserid/ as a page name.

And trying to navigate away from this invalid page (page with no content) doesn't work, as this coding: <?php bloginfo( 'url' ); ?> will always return https://cpanelserver.com/~cpaneluserid/, so the new page link will give you this URL: https://cpanelserver.com/~cpaneluserid/newpage/, showing the 'newpage' as a sub-directory of this invalid page '~cpaneluserid'.

Instead, the hosting company should be creating the staging URL with the user-id as a sub-domain, as in this format: https://cpaneluserid.cpanelserver.com/.

I just heard from my hosting company, and they had this excuse: "Unfortunately we are not providing a staging URL on the cPanel platform due to the number of potential security risks that are associated with it."

So basically no-one with a WordPress site on a cPanel hosting package can show their clients their website design, to get their approval, before they go live.

I am not sure why the hosting company thinks that this url: https://cpanelserver.com/~cpaneluserid/ is any less risky than this one: https://cpaneluserid.cpanelserver.com/?

So it looks like there is no answer for this post.

But now I am curious how other cPanel hosting companies deal with this 'security risk' of having a valid staging url.. or do they all use the same format as mine?

 

解决方案

I finally solved the problem.

It turned out to be a rooky cPanel user mistake!

I had used the cPanel server name for the WP_HOME and WP_SITEURL WordPress settings (ie: https://cpanelserver.com/), instead of the actual location of my hosting package on the cPanel server (ie: https://cpanelserver.com/~cpaneluserid/).

The way I had the settings meant that WordPress ignored the part of the URL that was the defined as the siteurl (ie: https://cpanelserver.com/), and treated everything after that as a page name (ie: /~cpaneluserid/).

So when I used https://cpanelserver.com/~cpaneluserid/. to view the site online, the cPanel hosting package correctly got me to the root of my website location, but WordPress didn’t take me to the home page, instead it took me to the non-existent /~cpaneluserid/. page.

If I had gotten the server name wrong in the WP settings, then I would not have been able to see my site, and would immediately know it was an issue on my side, and would have figured out this issue sooner.

But since I had the server name correct (even though the url was incomplete), I was able to view my site, and know that the database was correct.. so I erroneously thought that my WordPress settings were also correct. Instead, I was thinking that the page presentation & navigation issues where a problem with cPanels temporary URL format.

So in case anyone every has the same problem, I wanted to document it here.

IF you are using your cPanel's staging (or temporary) URL to access your site before it goes live, then BE SURE TO use the full URL that points to your cpanel hosting package - which should include your cPanel user ID as in: ‘https://cpanelserver.com/~cpaneluserid/’ in the WordPress settings of WP_HOME and WP_SITEURL.

这篇关于如何从cPanel登台URL访问WordPress主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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