Something in your install or db is causing this.
For a proper testing environment, you will need to get rid of all of that stuff that is still in your db.
Have you used this before? https://serverpress.com/
I use it on a daily basis. Recommended!!!