Setting up a staging environment is fairly straight forward with Wordpress. Copy the files contents to the new site/directory. Duplicate the database and update the wp-config.php file to point to the new db. And the final, critical step is to update the site URL. WordPress presents 4 different ways to do this.
The first option is what I tried. The site loaded, but there were issues with the layout. The site is using the Divi editor for front-end editing. I thought perhaps there is a rouge absolute URL somewhere, so I tried a find/replace search to point to the new staging URL. No luck.
The solution was to use the second option found on Change The Site URL page. This updates the database to point to the new URL. After that, all the layout issues disappeared with Divi! Just remember to remove the code from functions file when you’re done!
If you enjoyed this post, make sure you subscribe to my RSS feed!