Wordpress 主机 IP 已更改 [英] Wordpress host IP changed

查看:28
本文介绍了Wordpress 主机 IP 已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的家庭内部网上有一个 Wordpress 站点,由于 IP 地址已更改,该站点遇到了问题 - 加载了索引页,但未加载 CSS,我无法登录站点管理面板.

I've got a Wordpress site on our home intranet that has run into trouble now that the IP address has changed - The index page loads, but not the CSS and I can't log in to the site administration panel.

不幸的是,我在备份方面有点落后.有没有办法让 Wordpress 引用新的 IP 地址?

Unfortunately I am a bit behind on backups. Is there a way to get Wordpress to refer to the new IP address?

推荐答案

你有两个地方可以更新这个(三个,但我们会坚持两个).

You have two places to update this (well three, but we'll stick with the two).

如果您仍然可以登录到您的管理部分,请为您的 URI/wp-admin/options.php 键入以下内容 - 例如,如果您的站点是http://localhost 那么你的完整 URL 将是 http://localhost/wp-admin/options.php.登录到站点后,您应该会看到两个字段(好吧,您会看到很多字段),但是您需要查找其中包含 URL 的两个字段 - 站点 URL 和博客 URL(在 WP 中)2.7 字段标记为home"和siteurl",其他版本不确定).

If you can still log into your admin section, type the following for your URI /wp-admin/options.php - so for example, if your site is http://localhost then your full URL will be http://localhost/wp-admin/options.php. Once you've logged into your site you should see two fields (well you'll see a lot of fields), but you'll want to look for the two with URL's in them - the Site URL and the Blog URL (in WP 2.7 the fields are labeled "home" and "siteurl", not sure on the other versions).

或者,您可以登录 MySQL 数据库并运行以下命令.

Or, you can log into MySQL database and run the following.

Select * from wp_options where option_name IN('siteurl','home'); 

我今天刚刚在我的一个安装上运行了这个.如果您将 option_value 设置为您的本地主机 - 您可以运行以下命令:

I just ran this today on one of my installs. If you're option_value is set to your localhost - you can then run the following:

update wp_options set option_value='http://www.yourblogname.com' where option_name = 'siteurl';
update wp_options set option_value='http://www.yourblogname.com' where option_name = 'home';

这应该会更新您的表结构.

This should update your table structure.

这篇关于Wordpress 主机 IP 已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆