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.
- In SQL Server Management Studio, right-click on your DotNetNuke database, go to Tasks --> Backup
- Back up your entire DotNetNuke database to a file.
- Right-Click on Database --> New Database
- Make yourself a blank database.... I called mine DotNetTest -- make the OWNER of the database the same as your DotNetNuke database.
- Right-Click on the Database you just created --> Tasks --> Restore --> Database
- In the wizard that comes up, select DotNetTest as the "To Database", select "From Device", select the backup you created previously.
- Check both backup sets to restore
- In Options, select "Overwrite the existing database (WITH REPLACE) --- if you don't do this, it will refuse to restore.
- Click OK.
.... your database is ready. Now, for the files.
- On your database server, copy the entire DNN file structure to a new folder. I called mine E:\Sandbox\
- In E:\Sandbox, open web.config
- Find the lines that say Database=DotNetNuke; and change them to say Database=DotNetTest; .... there should be two locations.
- Open up IIS on your web server. Create a new web site, I called mine "Sandbox". Give it a name like sandbox.mydomain.com (if your regular site is www.mydomain.com) Point the Physical Path to your sandbox folder (i.e. E:\Sandbox)
- Back in SQL Management Studio, open your DotNetTest database, right-click on dbo.PortalAlias and select "Edit top 200 rows"
- Change the HTTPAlias field from www.mydomain.com to sandbox.mydomain.com and close the table.
- Restart your IIS Web services for your new sandbox site, so it reloads DNN.
- Don't forget to update your DNS to resolve sandbox.mydomain.com to your web server.
- Browse over to sandbox.mydomain.com 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.