Copying live site that is using older version of WP to localhost

Here are the steps I do when I copy a WordPress site (old/new version, live or local).

  1. Download all the wp-content/ directory and replace the files (nothing else)

  2. Rename the wp-config-sample.php in wp-config.php and adapt the environments variables to your new environment (database name, database user, database password…)

  3. Download the database’s content as a .sql file and import it in your new environment

    1. Run this SQL commands in your new database to update ALL the urls (site, posts, attachements…) : https://wpbeaches.com/updating-wordpress-mysql-database-after-moving-to-a-new-url/

That should work fine once all these steps done.