admin管理员组

文章数量:1414620

I need to create a local copy of a live site for development purposes.

The live site is 30GB+ in size and so I don't want to download all of the uploaded media.

I have copied all but the uploads directory to my development machine.

I have also made a copy of the database:

mysqldump -u root -p live_db > db.wp__backup.sql

And from here on, I'm stuck.

I have the WP CLI installed. I have tried these steps:

> wp db create
> wp db import db.wp__backup.sql

But when I start WP, I'm taken to the new installation page and a fresh installation is created without any of the data from the database.

Given that I have a copy of the database and the site directory itself, how do I create a local copy of a WP website?

I need to create a local copy of a live site for development purposes.

The live site is 30GB+ in size and so I don't want to download all of the uploaded media.

I have copied all but the uploads directory to my development machine.

I have also made a copy of the database:

mysqldump -u root -p live_db > db.wp__backup.sql

And from here on, I'm stuck.

I have the WP CLI installed. I have tried these steps:

> wp db create
> wp db import db.wp__backup.sql

But when I start WP, I'm taken to the new installation page and a fresh installation is created without any of the data from the database.

Given that I have a copy of the database and the site directory itself, how do I create a local copy of a WP website?

Share Improve this question asked Sep 3, 2019 at 19:26 user3574603user3574603 3411 gold badge2 silver badges11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

wp-cli makes use of your wp-config.php credentials to connect to the db, so the fact that you are getting the install screen, and not getting any errors (I assume) when running wp-cli commands says that you seem to have it configured correctly. My only thought would be that your $table_prefix value doesn't match the tables you've imported.

本文标签: sqlWhat steps do I need to take to install a local copy of a live website