简体   繁体   English

WP_SITEURL 变量问题

[英]WP_SITEURL variable issue

I need to upload a fully working Wordpress website to some online OVH hosting我需要将一个完全可用的 Wordpress 网站上传到一些在线 OVH 托管

On localhost, the files are stored in a "wordpress/" subdirectory, whereas online they are stored in the root "www/" directory so that there is no "wordpress" in any url.在本地主机上,文件存储在“wordpress/”子目录中,而在线时它们存储在根“www/”目录中,因此任何网址中都没有“wordpress”。

So I have done replacements in the database (this is not the first time I do such a move and last time it worked nicely thanks to good tutorials here or there -- by the way this http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ is really useful)所以我已经在数据库中进行了替换(这不是我第一次这样做,最后一次它运行良好,这要归功于这里或那里的优秀教程——顺便说一下这个http://interconnectit.com/products/search -and-replace-for-wordpress-databases/真的很有用)

Still I have spent the whole afternoon unsuccessfully making this website work :我仍然花了整个下午没有成功地使这个网站工作:

http://www.ditoprod.com/ http://www.ditoprod.com/

In fact I need to know more about the WP_SITEURL variable, cf wp_config.php :事实上,我需要更多地了解 WP_SITEURL 变量,参见 wp_config.php :

define('WP_SITEURL', 'htp:/www.ditoprod.com' );

Actually if I set it to "htp:/www.ditoprod.com/wordpress" the site will not be able to load any image or style because there is no "wordpress" directory, but if I set it to 'htp:/www.ditoprod.com' it will only show a blank page as if there were a php error (the problem here is I cannot find how to access OVH apache error logs unless I upgrade my account ><)实际上,如果我将其设置为“htp:/www.ditoprod.com/wordpress”,该站点将无法加载任何图像或样式,因为没有“wordpress”目录,但如果我将其设置为“htp:/www” .ditoprod.com' 它只会显示一个空白页面,就好像存在 php 错误一样(这里的问题是我找不到如何访问 OVH apache 错误日志,除非我升级我的帐户 ><)

You probably set /wordpress as the home and site URL when you initially set up the site, so the value is stored in the database.您可能在最初设置站点时将/wordpress设置为主页和站点 URL,因此该值存储在数据库中。 Either change the values in the database or put this into wp-config.php更改数据库中的值或将其放入 wp-config.php

define('WP_SITEURL', 'http://www.ditoprod.com');
define('WP_HOME',    'http://www.ditoprod.com');

There's also a typo in your URL - it's "http" not "htp".您的 URL 中还有一个拼写错误 - 它是“http”而不是“htp”。

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

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