简体   繁体   English

没有DNS的Cpanel / WHM上的Wordpress

[英]Wordpress on Cpanel/WHM without DNS

Anyone have experience setting up different environments for WP? 任何人都有为WP设置不同环境的经验吗?

Currently we have to setup local, dev, staging environments for WP. 当前,我们必须为WP设置本地的开发阶段环境。 Unfortunately we don't have a DNS. 不幸的是我们没有DNS。 We have WHM/CPanel setup and I'm currently accessing the subdomain ('dev') by using ip/~username/dev. 我们已经安装了WHM / CPanel,目前正在使用ip /〜username / dev访问子域('dev')。

I found this documentation on setting up multiple environments, but it implies having a DNS for the staging environments. 我发现此文档是关于设置多个环境的,但是它意味着为暂存环境使用DNS。 I actually have WP installed on the dev environment, but it wasn't styled - so the web root isn't reading properly, and I'm having issues connecting to the database. 我实际上已经在开发环境中安装了WP,但是它的样式没有设置-因此Web根无法正确读取,并且在连接数据库时遇到了问题。

If anyone knows what I would need to change the database settings to that would be awesome. 如果有人知道我需要将数据库设置更改为该设置,那就太好了。

Ok I think I figured this out. 好吧,我想我明白了。 Because the SERVER_NAME is an ip address, it wasn't finding the "dev" in the url. 由于SERVER_NAME是一个IP地址,因此无法在URL中找到“ dev”。 I ended up using 'SCRIPT_FILENAME' instead. 我最终使用了“ SCRIPT_FILENAME”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM