Copied site to new subdomain – Cannot add new post or page
-
Last time I came to these forums it was extremely helpful so I’m going for a second try.
I am creating a wordpress site that will have a demo where people can login, play around, delete/add anything they want but after an hour, a cronjob will run that sets it all back to normal. The way I thought to do this was to create a demo site, and a demo-clean site (which never changes, just serves as a starting point for the copy each hour). The cronjob takes deletes everything from the demo directory and copies every file from the demo-clean directory back in. The database tables are all copied as well with changes made to the wp_usermeta, wp_posts, and wp_options tables to update the URL from the demo-clean subdomain to the demo subdomain.
Firstly, is this the best way to do this or does anyone else have any suggestions on an easier way to accomplish a “reset eeverything on the site (files and database) back to a baseline every X-hours?”
Secondly, my approach seems to work with one caveat; I cannot add new posts or new pages–I get a 404. There may be other things missing that I haven’t seen yet but I think that’s it (and it seems as though after a while of playing around the permalink settings page will show up blank indicating another problem). I have compared the database tables of the demo-clean site and the demo site and the only differences are the URLs in various spots.
I sure hope someone knows why I get these strange quirks when copying the site (or better yet has a simpler/better way of creating a “playground” site that can be reset)
As always, thank you www.remarpro.com community!
- The topic ‘Copied site to new subdomain – Cannot add new post or page’ is closed to new replies.