简体   繁体   English

WordPress在错误的子域中查找wp内容

[英]Wordpress looking in the wrong subdomain for wp-content

I have my wordpress installation at /var/www/html/wordpress2 and there's a totally separate wordpress installation at /var/www/html/html/wordpress . 我在/var/www/html/wordpress2 wordpress2上安装了wordpress,在/var/www/html/html/wordpress安装了一个完全独立的wordpress安装。

When running the worpdress2 installation, I get errors saying it can't find /var/www/html/wordpress/wp-content/theme/.... How do I change it to look for these things in wordpress2 and not wordpress ? 运行worpdress2安装时,出现错误,提示无法找到/var/www/html/wordpress/wp-content/theme/....如何更改它以在wordpress2而不是wordpress查找这些内容?

Did you transfer wordpress to Wordpress 2? 您是否将wordpress转移到了wordpress 2? If so you need two separate databases, one for Wordpress and the other for Wordpress 2. Then you need to check the wp_options table to have their correct subfolder in the site URL and home URL. 如果是这样,则需要两个单独的数据库,一个用于Wordpress,另一个用于Wordpress2。然后,您需要检查wp_options表以在站点URL和主URL中获得其正确的子文件夹。

Follow these steps in order to transfer your WordPress site from one location to another. 请按照以下步骤操作,以将您的WordPress网站从一个位置转移到另一个位置。

  1. Change the option_value(your root url of current wordpress site) corresponding to id(value 1) and option_name(value site_url) . 更改与id(value 1)option_name(value site_url)对应的option_value(your root url of current wordpress site) option_name(value site_url)

  2. Access your wp-admin(siteurl/wp-adimn) . 访问您的wp-admin(siteurl/wp-adimn) Go to general-setting panel and change Site Address (URL), same as WordPress Address (URL). 转到常规设置面板,然后更改站点地址(URL),与WordPress地址(URL)相同。

Hope this will work for you. 希望这对您有用。 Same process you can follow to move WordPress site from local to server or one server to another. 您可以按照相同的过程将WordPress网站从本地移动到服务器,也可以将一台服务器移动到另一台服务器。

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

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