如何让wordpress留在本地? [英] How to get wordpress to stay local?

查看:25
本文介绍了如何让wordpress留在本地?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已复制到本地主机(包括数据库)的现有 wordpress.我更改了本地主机的 wp-config.php,但是当我尝试转到 wordpress/wp-admin 时,它连接到我的实时站点...

I have an existing wordpress that I copied to my localhost (including databases). I changed the wp-config.php for localhost, but when I try to go to wordpress/wp-admin, it connects to my live site...

我需要改变什么?(顺便说一句,使用 XAMMP)

What do I need to change? (btw, using XAMMP)

推荐答案

将这两行添加到您的 wp-config.php 中,其中http://localhost/wordpress/"是正确的您网站的位置.

Add these two lines to your wp-config.php, where "http://localhost/wordpress/" is the correct location of your site.

define('WP_HOME','http://localhost/wordpress/');
define('WP_SITEURL','http://localhost/wordpress/');

或检查表 wp_options 列 option_name = siteurl 检查 option_value

or check in table wp_options column option_name = siteurl check the option_value

请参阅此处了解更多信息 http://codex.wordpress.org/Changing_The_Site_URL

Please refer here for more information http://codex.wordpress.org/Changing_The_Site_URL

这篇关于如何让wordpress留在本地?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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