如何在localhost中设置wordpress备份?

时间:2013-11-27 10:23:18

标签: wordpress install backup

我有一个wordpress站点的数据库备份和整个站点文件夹备份。我想在我的localhost中设置它。这些是我遵循的步骤。

  1. 创建数据库
  2. 导入database_backup.sql
  3. 打开wp-config.php并编辑以下详细信息
  4.   

    define('DB_NAME','contents_wp');

         

    define('DB_USER','root');

         

    define('DB_PASSWORD','');

         

    define('DB_HOST','127.0.0.1');

    但我无法登录管理面板。它重定向到实时站点。怎么解决这个?我在这里做错了什么?

    任何建议都将受到赞赏。

3 个答案:

答案 0 :(得分:1)

您需要修改网站网址:http://codex.wordpress.org/Changing_The_Site_URL

答案 1 :(得分:1)

Simple trick here

1>> Delete your wp-config.php file, so that it will ask you re create the file

2>> Give the details as the system asks, like your db name, user name, password and table prefix.

3>> Next set the site title and log in to the admin panel.

4>> After logging in to the admin panel go to the "settings" menu set the "site url" and "home url" over there.

5>> Then you are all set with the settings, you can see your site in the  system now

6>> You might need to change the image paths if required, for that build a query and run that for ex: 

update clc_postmeta set meta_value= REPLACE(meta_value,
'http://wp.raddyx.in/CLC-Wordpress', 'http://clc.com/~clc/') WHERE
meta_value LIKE '%http://wp.raddyx.in/CLC-Wordpress%';


7>> Atleast run this query for wp_posts and postmeta table

答案 2 :(得分:0)

迁移Wordpress网站您需要在config.php文件中编辑信息,之后在您的数据库表名称中显示“wp_options”需要编辑“siteurl”和“{{中的值1}}“字段。

1))siteurl是我们在浏览器中写入url时重定向我们网站的网址。 2))home是url,当我们添加url / wp-admin,然后在哪里重定向。

请参阅屏幕截图。enter image description here