运行 在本地主机中从一台计算机到另一台计算机的 wordpress 站点
Run a wordpress site from one computer to another in localhost
我的一台电脑上有一个 Wordpress 网站。现在我想 运行 在本地另一台计算机上的那个站点(xampp 或 wamp)。
为此,我使用数据库 SQL 文件压缩了该文件夹中的所有文件,并将该压缩文件解压缩到另一台 PC xampp htdocs 文件夹中。创建数据库并在数据库中导入 SQL 文件。
但是 运行 连接网站时出现错误
Not Found
The requested URL /Ullash/builders/index.php was not found on this server.
我在wp-config.php
中添加了以下代码
define( 'WP_HOME', 'http://localhost/Projects/new-ullash/builders' );
define( 'WP_SITEURL', 'http://localhost/Projects/new-ullash/builders' );
但是还是一样的错误
有人帮忙吗?提前致谢
我找到了解决办法。
在 wp-config.php
中添加以下代码
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
并更改 .htaccess
文件中的项目路径
<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>
如果您想更干净、更快地完成所有操作,请安装 All in one Migration
https://wordpress.org/plugins/all-in-one-wp-migration/
我的一台电脑上有一个 Wordpress 网站。现在我想 运行 在本地另一台计算机上的那个站点(xampp 或 wamp)。 为此,我使用数据库 SQL 文件压缩了该文件夹中的所有文件,并将该压缩文件解压缩到另一台 PC xampp htdocs 文件夹中。创建数据库并在数据库中导入 SQL 文件。
但是 运行 连接网站时出现错误
Not Found The requested URL /Ullash/builders/index.php was not found on this server.
我在wp-config.php
define( 'WP_HOME', 'http://localhost/Projects/new-ullash/builders' );
define( 'WP_SITEURL', 'http://localhost/Projects/new-ullash/builders' );
但是还是一样的错误
有人帮忙吗?提前致谢
我找到了解决办法。
在 wp-config.php
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
并更改 .htaccess
文件中的项目路径
<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>
如果您想更干净、更快地完成所有操作,请安装 All in one Migration
https://wordpress.org/plugins/all-in-one-wp-migration/