Php Wordpress从一台服务器迁移到另一台服务器(找不到页面)

Php Wordpress从一台服务器迁移到另一台服务器(找不到页面),php,mysql,wordpress,Php,Mysql,Wordpress,当我将WordPress站点从一台服务器迁移到另一台服务器时。未找到页面,访问页面时出错。我已经更新了wp config、.htaccess文件,还使用表中的新站点URL更改了链接和URL 我遵循了以下步骤: wp-config.php define( 'DB_NAME', 'my-db-name' ); define( 'DB_USER', 'my-db-user' ); define( 'DB_PASSWORD', 'my-db-pwd' ); define( 'DB_HOST', 'loc

当我将WordPress站点从一台服务器迁移到另一台服务器时。未找到页面,访问页面时出错。我已经更新了wp config、.htaccess文件,还使用表中的新站点URL更改了链接和URL

我遵循了以下步骤:

wp-config.php

define( 'DB_NAME', 'my-db-name' );
define( 'DB_USER', 'my-db-user' );
define( 'DB_PASSWORD', 'my-db-pwd' );
define( 'DB_HOST', 'localhost' );
WordPress设置

    Settings->
    WordPress Address (URL) - New-URL
    Site Address (URL)      - New-URL
.htacess.php

    Generate the .htacess from Permalink Settings

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /folder-name/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /folder-name/index.php [L]
</IfModule>
在此服务器上找不到请求的URL/新URL/文件夹名称/页面名称
位于新URL端口80的Apache/2.4.7(Ubuntu)服务器

如果permalinks被刷新并且您也更新了数据库,您可能会遇到htaccess问题

.htaccess
应该用双c拼写,不应该有.php扩展名。您还必须将内部的
文件夹名称
更新为您正在使用的实际文件夹

.htaccess
文件:

# BEGIN WordPress
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /folder-name/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /folder-name/index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写基本/文件夹名称/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/文件夹名/index.php[L]
#结束WordPress
另请检查此.htaccess文件:

如果永久链接被刷新,并且您也更新了数据库,那么您可能会遇到htaccess问题

.htaccess
应该用双c拼写,不应该有.php扩展名。您还必须将内部的
文件夹名称
更新为您正在使用的实际文件夹

.htaccess
文件:

# BEGIN WordPress
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /folder-name/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /folder-name/index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写基本/文件夹名称/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/文件夹名/index.php[L]
#结束WordPress
另请检查此.htaccess文件:

您是否查看了永久链接设置以刷新永久链接缓存?是的,我刷新了永久链接设置,但仍然面临同样的问题。您是否查看了永久链接设置以刷新永久链接缓存?是的,我确实刷新了永久链接设置,但仍然面临同样的问题