简体   繁体   English

迁移后的 wordpress 网站无法正常工作

[英]wordpress website after migrating doesnt works same

I just tried to migrate my worpress site to my local host wamp server i did backup database as well as all the files required but still i cant see the whole website i could just see a logo and all themes are gone as well as all the css is not shown however when i go to dashboard i could see all things.我只是试图将我的 worpress 站点迁移到我的本地主机 wamp 服务器,我备份了数据库以及所需的所有文件,但仍然看不到整个网站,我只能看到一个徽标,所有主题以及所有 css 都消失了未显示,但是当我进入仪表板时,我可以看到所有内容。 I even tried to move it to an online server hosting same issue occurs我什至试图将它移动到托管相同问题的在线服务器上

You need to update the sites address in the database.您需要更新数据库中的站点地址。 Because the data is serialized you can't just update it with a simple query.因为数据是序列化的,你不能只用一个简单的查询来更新它。 I would recommend running this serialized data tool .我建议运行这个序列化数据工具 I have no affiliation with the tool and it is free.我与该工具没有任何关系,它是免费的。 I have used it a ton of times and it works great.我已经使用它很多次了,效果很好。

You will just replace the URL you used on your local machine with the one for the server you are running the tool on.您只需将您在本地机器上使用的 URL 替换为您正在运行该工具的服务器的 URL。

Use PHPMyadmin or something to review the wp_options table.使用 PHPMyadmin 或其他工具查看 wp_options 表。 It likely still has references to your old server, like '/home/user/directory/' After making a backup copy of that table, find what the correct path is, and use the following MySQL query to correct your wp_options entries它可能仍然引用您的旧服务器,例如'/home/user/directory/'在制作该表的备份副本后,找到正确的路径,并使用以下 MySQL 查询来更正您的 wp_options 条目

update wp_options set `option_value` = replace(`option_value`, 
'OLD/WORDPRESS/DEV', 'NEW/WORDPRESS/SITE');

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

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