I couldn’t find any receipt to clone a WordPress blog. A user needed to have a test copy of his blog.
Here is mine. I hope it can be useful to others.
Copy the WP:
Prepare the DB for the clone:
This is the magic here. Because WordPress stores string lengths along with strings in the DB.
We need to adapt them in the dump to be imported into the new DB for the clone. Otherwise, the clone won’t be fully functional.
Of course, a quicker alternative is to chose a name with the same length.
Create the database for the clone:
Adapt the apache conf: