• I’ve recently created a Sandbox plugin and I would appreciate feedback.

    The plugin comes from a need I had for testing WordPress sites. I was constantly downloading local copies for verifying upgrades of WordPress, Woocommerce, etc to make sure they didn’t break various sites I maintain. I was also always building local copies testing new themes or plugins.

    This plugin basically creates a complete sandbox version of a live site in two clicks using the existing hosting so you can test pretty much anything. The test site maintains the same domain/url using some mod_rewrite trickery and is only available to the administrator of the site. You can create multiple sandboxes for different testing and easily remove them when you are done. Sandboxes can also be edited with Dreamweaver, etc.

    It’s currently an early version and I’m working through the various nuances of the plethora of installs out there. Any feedback any one has I’d greatly appreciate. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • ywait4ever

    (@ywait4ever)

    I tried it and it seemed to create the sandbox ok, but I couldn’t understand how to view the sandbox site. It also wouldn’t de-activate when I clicked on the link so I had to log in from a different browser (Chrome) to delete it, and now I can’t get to my site from my original browser (IE 11).

    Thread Starter barteled

    (@barteled)

    If you go to the listing of sandboxes, click the activate button for the sandbox you want to activate. If you saw the link to deactivate the sandbox, it was already activated. The sandbox looks exactly like your live site with the exception of the message box in the admin interface for deactivating it.

    The sandbox is “activated” by placing a cookie in your browser. This notifies the .htaccess file to use a sandbox and which one. If for any reason you damage a sandbox to the point that you cannot use the deactivation link, simply delete the cookie (this varies per browser) and you will be returned to the live site. As you found out, you can also use a different browser and this will bring up the live site.

    The code for deleting the cookie should work in IE 11 but I haven’t actually tested it. I will give it a try and see if I can recreate the issue you had.

    ywait4ever

    (@ywait4ever)

    Thanks for the response. Can you tell me the name of the cookie? I can’t find anything that looks like it might be the one and I really don’t like just deleting them all. I’ll try activating the plugin again. Is there a way for me to share a url to the test site with others? Even if it just resided in a subdirectory called ‘sandbox’ that would work. Also, is there a way to just turn the sandbox site into the active one, or do I have to re-create all the activity from the testing and modification?

    Thread Starter barteled

    (@barteled)

    The cookie is called “sandbox”. It will only be present when a sandbox is activated.

    I am working on the capability of sharing a sandbox site via a URL that will activate the cookie. Unfortunately WordPress and some plugins do not handle a base URL change well. If you gave the subdirectory that the sandbox is in, the site would most likely not load correctly. This was the primary reason I built the plugin in the first place.

    As for migrating from the sandbox to the test site, this is something I plan to add in a future release once the plugin has picked up some momentum. This is a pretty complex addition but basically I am looking being able to do a diff between the live site and a sandbox and then migrating the changes with a click. So currently you have to recreate the changes manually.

    ITGuy

    (@clubmein)

    I am developing a portal having wordpress as the frontend and java as the backend through Tomcat 6. It was working great and was able to have pages on wordpress and redirect to jsp pages on Tomcat.

    I have to remove the”/wp” directory from tomcat to make PHP work, but today I installed the “sandbox” plugin and for some reason I have no more access to my wordpress directories. I see the files are still there and a new “/wp/sandbox” directory was created.

    Would this plugin be the reason why PHP stopped working?
    Are wordpress settings or requirements changed after installing the new plugin?

    The site(frontend) went down completely and my hosting provider has not come back to me giving me a status. I was just wondering if I might have created this problem when installing this plugin and need to have them configure wordpress in a different way.
    Thanks for your help.

    Thread Starter barteled

    (@barteled)

    The plugin makes a change to .htaccess in the WordPress directory when installed. The lines look something like this:
    # BEGIN Sandbox
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/sandbox/.* [NC]
    RewriteCond %{HTTP_COOKIE} sandbox=([^;]+) [NC]
    RewriteRule ^(.*)$ /sandbox/%1/$1 [NC,L,QSA,S=10]
    </IfModule>
    # END Sandbox

    Try commenting them out and see if the site returns. If so I can help you further if you provide contents of the .htaccess

    Other then this, no other changes are made to the site when the plugin is installed.

    ywait4ever

    (@ywait4ever)

    I can’t find a cookie named sandbox and my site only displays as text. I also can’t get to the login screen in IE 11. In Chrome everything seems fine. If I log out of the site in Chrome it doesn’t help the IE 11 situation.

    ITGuy

    (@clubmein)

    Thanks for your comment barteled.

    It seems to be working now. While backing up through FTP before using this plugin, I moved a folder to the wrong position. Nothing to do with the plugin. Thanks for your help. Issue close.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Sandbox plugin for testing WordPress sites’ is closed to new replies.