How To: Make a DNN Sandbox

General Topics > FAQs

Troubleshooting an issue on a live site can be difficult, especially when you don't want to risk any downtime for your users. The best way to troubleshoot an issue on a live site without affecting the actual site would be to create a dev sandbox of your site either on your local machine or on your development server. This article outlines the steps to create a DNN sandbox (exact copy of your live site) in about 10 minutes.

This method does NOT require you to re-install DNN.

It does NOT require you to install another instance of SQL.

What it DOES is give you a sandbox to play in (a development site exactly like your existing site that you can test stuff in first.) Note: I use SQL Server 2008 and DNN 5, although this method SHOULD work with just about any flavors.
Requirements: Access to your SQL Server Management Studio. Access to your Web Server, including IIS.
  1. In SQL Server Management Studio, right-click on your DotNetNuke database, go to Tasks --> Backup
  2. Back up your entire DotNetNuke database to a file.
  3. Right-Click on Database --> New Database
  4. Make yourself a blank database.... I called mine DotNetTest -- make the OWNER of the database the same as your DotNetNuke database.
  5. Right-Click on the Database you just created --> Tasks --> Restore --> Database
  6. In the wizard that comes up, select DotNetTest as the "To Database", select "From Device", select the backup you created previously.
  7. Check both backup sets to restore
  8. In Options, select "Overwrite the existing database (WITH REPLACE) --- if you don't do this, it will refuse to restore.
  9. Click OK.
.... your database is ready. Now, for the files.
  1. On your database server, copy the entire DNN file structure to a new folder. I called mine E:\Sandbox\ 
  2. In E:\Sandbox, open web.config
  3. Find the lines that say Database=DotNetNuke; and change them to say Database=DotNetTest; .... there should be two locations.
  4. Open up IIS on your web server. Create a new web site, I called mine "Sandbox". Give it a name like (if your regular site is Point the Physical Path to your sandbox folder (i.e. E:\Sandbox)
  5. Back in SQL Management Studio, open your DotNetTest database, right-click on dbo.PortalAlias and select "Edit top 200 rows"
  6. Change the HTTPAlias field from to and close the table.
  7. Restart your IIS Web services for your new sandbox site, so it reloads DNN.
  8. Don't forget to update your DNS to resolve to your web server.
  9. Browse over to and do your development there.
The best part(s) about this is that you don't have to re-install anything, you get an exact snapshot of your DNN installation, and a mirror of the live database that you can play with. If you break things, just restore the database from the backup again.
If you have questions, feel free to ask.