Automatically clone wordpress site to subdirectory
I have done this exact thing so that I can test plugin updates. I wrote a shell script (bash) to create the sub directory and copy the files. Then, I leveraged WP-CLI commands to create wp-config file, export/import the database and search and replace the site name in DB. Here is my script with specifics … Read more