database - Cloning blog to localhost via WAMP

How do restore a Wordpress blog (actually, cloning would be the right word) from my server to localhost with WAMP?I back

How do restore a Wordpress blog (actually, cloning would be the right word) from my server to localhost with WAMP?

I backed up my blog with BackUpWordPress and got a .zip file sitename.backup.2012-01-29-12-50-08. As per instructions, I unzipped the file and got a complete Wordpress installation (folders wp-admin, wp-content, a bunch of files, .htaccess etc.) and an SQL database named database_myusername_wrdp2.

I copied all the files except the database to WAMP's www folder.

Then I opened phpMyAdmin through WAMP, created a database named wordpress, opened that database and used Import button to import database_myusername_wrdp2 to this new database.

Unfortunately, there is obviously no connection between the installation and a database as I get Error establishing a database connection message when I try to open localhost.

What am I doing wrong? How do I clone this blog locally?

How do restore a Wordpress blog (actually, cloning would be the right word) from my server to localhost with WAMP?

I backed up my blog with BackUpWordPress and got a .zip file sitename.backup.2012-01-29-12-50-08. As per instructions, I unzipped the file and got a complete Wordpress installation (folders wp-admin, wp-content, a bunch of files, .htaccess etc.) and an SQL database named database_myusername_wrdp2.

I copied all the files except the database to WAMP's www folder.

Then I opened phpMyAdmin through WAMP, created a database named wordpress, opened that database and used Import button to import database_myusername_wrdp2 to this new database.

Unfortunately, there is obviously no connection between the installation and a database as I get Error establishing a database connection message when I try to open localhost.

What am I doing wrong? How do I clone this blog locally?

Share Improve this question asked Jan 29, 2012 at 12:44 rlabrlab 1531 gold badge4 silver badges15 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

You must change the parameters to connect to the database in the file wp-config.php in the root folder of your Wordpress installation, or create the same user/password and database name for the database that you have created locally with WAMP.

Note: You may have to change the blog_url and every url in the dump that refers to images/css in the posts , if you want to use it locally. You can do this via a find/replace in the SQL ( http://www.youronlinesite -> http://localhost) or in the SQL after you create the DB, see this link for a list of useful queries

Use this: https://br.wordpress/plugins/all-in-one-wp-migration/

  1. Install the plugin in the source and in destination (normal wordpress installation recently installed preferentially).

  2. Export the site in the plugin in source, then import in the destination.

  3. See the magic happens and be happy! :)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745400661a4626084.html

相关推荐

  • database - Cloning blog to localhost via WAMP

    How do restore a Wordpress blog (actually, cloning would be the right word) from my server to localhost with WAMP?I back

    3小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信