【问题标题】:How to setup a wordpress backup in localhost?如何在 localhost 中设置 wordpress 备份?
【发布时间】:2013-12-12 22:25:02
【问题描述】:

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

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

define('DB_NAME', 'contents_wp');

define('DB_USER', 'root');

define('DB_PASSWORD', '');

define('DB_HOST', '127.0.0.1');

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

任何建议将不胜感激。

【问题讨论】:

    标签: wordpress installation backup


    【解决方案1】:

    您需要编辑网站网址:http://codex.wordpress.org/Changing_The_Site_URL

    【讨论】:

      【解决方案2】:
      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
      

      【讨论】:

        【解决方案3】:

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

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

        见截图。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2018-10-20
          • 2016-05-17
          • 2020-10-21
          • 2015-01-08
          • 1970-01-01
          • 2017-07-02
          • 2015-09-18
          相关资源
          最近更新 更多