当我在WordPress中更改域名时,第一页不显示

发布于 2025-01-21 15:58:59 字数 223 浏览 3 评论 0原文

至于标题,我更改了网站的域名,但是当我返回WordPress时,我的第一页可以在浏览器上显示,似乎只有HTML并非任何CSS。我已经检查了我的所有域和地址设置,它们都是相同的。谁能帮助我解决这个问题?思考。 在此处输入图像描述 上图是我打开主页时。

As for the title, I changed the domain nane of my site, but when I go back to WordPress, my first page can display on the browser, seems like only HTML not any css. I has checked my all domain and address setting, they are all same. Can anyone help me with how to solve this problem? Thinks.
enter image description here
above picture is when I open my home page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红焚 2025-01-28 15:58:59

在WordPress DB中,域有许多参考。您必须在网站重新播放之前对其进行更改。

在这里,您必须执行一些示例查询,但是请小心,在之前备份数据库:

检查db上是否存在选择:

SELECT * FROM wp_posts where post_content like '%<OLD DOMAIN>%';
SELECT * FROM wp_posts where guid like '%<OLD DOMAIN>%';
SELECT * from wp_options where option_value like '%<OLD DOMAIN>%';

只有这样,您才能进行替换带有更新的域:

UPDATE wp_posts SET post_content = REPLACE(post_content, '<OLD DOMAIN>', '<NEW DOMAIN>');
UPDATE wp_posts SET guid = REPLACE(guid,  '<OLD DOMAIN>', '<NEW DOMAIN>');
UPDATE wp_options SET option_value = REPLACE(option_value,  '<OLD DOMAIN>', '<NEW DOMAIN>');

In the Wordpress DB there are many reference of the domain. You have to change them before the website come back to live.

Here some sample queries you have to do, but PLEASE BE CAREFUL, MAKE A BACKUP OF THE DATABASE BEFORE:

Check if these references exist on the DB with the SELECT:

SELECT * FROM wp_posts where post_content like '%<OLD DOMAIN>%';
SELECT * FROM wp_posts where guid like '%<OLD DOMAIN>%';
SELECT * from wp_options where option_value like '%<OLD DOMAIN>%';

and only then, you can do a replace of the domain with the UPDATE:

UPDATE wp_posts SET post_content = REPLACE(post_content, '<OLD DOMAIN>', '<NEW DOMAIN>');
UPDATE wp_posts SET guid = REPLACE(guid,  '<OLD DOMAIN>', '<NEW DOMAIN>');
UPDATE wp_options SET option_value = REPLACE(option_value,  '<OLD DOMAIN>', '<NEW DOMAIN>');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文