Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在localhost中从一台计算机运行wordpress站点到另一台计算机_Php_Wordpress_Xampp_Wamp - Fatal编程技术网

Php 在localhost中从一台计算机运行wordpress站点到另一台计算机

Php 在localhost中从一台计算机运行wordpress站点到另一台计算机,php,wordpress,xampp,wamp,Php,Wordpress,Xampp,Wamp,我的一台电脑上有一个Wordpress网站。现在我想在另一台本地计算机上运行该站点xampp或wamp。 为此,我使用数据库SQL文件压缩了该文件夹中的所有文件,并将压缩后的文件解压缩到另一个PC xampp htdocs文件夹中。创建数据库并在数据库中导入SQL文件 但在运行该站点时,会出现一个错误 找不到 在此服务器上找不到请求的URL/Ullash/builders/index.php 我在wp-config.php中添加了以下代码 但错误仍然是一样的 有人帮忙吗?提前谢谢我已经得到了解决

我的一台电脑上有一个Wordpress网站。现在我想在另一台本地计算机上运行该站点xampp或wamp。 为此,我使用数据库SQL文件压缩了该文件夹中的所有文件,并将压缩后的文件解压缩到另一个PC xampp htdocs文件夹中。创建数据库并在数据库中导入SQL文件

但在运行该站点时,会出现一个错误

找不到 在此服务器上找不到请求的URL/Ullash/builders/index.php

我在wp-config.php中添加了以下代码

但错误仍然是一样的

有人帮忙吗?提前谢谢

我已经得到了解决方案。 在wp-config.php中添加以下代码

并更改.htaccess文件中的项目路径


如果您想以更干净、更快的方式完成所有工作,请在一次迁移中安装所有组件

define( 'WP_HOME', 'http://localhost/Projects/new-ullash/builders' );
define( 'WP_SITEURL', 'http://localhost/Projects/new-ullash/builders' );
define( 'WP_HOME', 'site url' ); // site url sample : http://localhost/Projects/new-ullash/builders
define( 'WP_SITEURL', 'site url' ); // site url sample : http://localhost/Projects/new-ullash/builders
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /Projects/new-ullash/builders/  // change project path here
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /Projects/new-ullash/builders/index.php [L] // change project path here
</IfModule>