I’ve tried to find good ways to test my work in a variety of browsers, especially older versions of Internet Explorer (IE). There are a lot of great solutions available for this kind of testing but I have limited funds and many solutions need a paid subscription or are free but only for a limited trial.
Imagine my delight when I ran into modern.ie, hosted by Microsoft. It offers information on how to test for browser compatibility, but the most valuable thing it provides is a bunch of virtual machines you can download (for free) to run with versions of Internet Explorer from 6 up to 11. They even have a VM for IE 11 on Windows 8.1!
Needless to say I was in geeky heaven and promptly downloaded the various VM’s for testing on, but my excitement was short-lived. I was able to open Internet Explorer in the VM and connect to my development machine, but when I navigated to the WordPress theme I was working on I got the HTML with no styling applied . I fired up the built-in developer tools in IE and determined the problem was that WordPress was passing “localhost” as the server name for the file paths. Obviously this would not do since “localhost” just loops back to the current machine.
My brain started going ten million miles an hour trying to decide how best to implement a local DNS server to point everything to the right place. I started questioning where to host it… do I want to use my regular workstation and take up valuable CPU Cycles and memory to run it, or try to come up with a secondary dedicated server? If so I would need to have the hardware available and the time to configure everything. Then it dawned on me I didn’t have to make everything so complicated. The problem wasn’t DNS, it was the way I had configured WordPress in my development environment. In the settings tab of the WordPress dashboard there are two fields for the WordPress URL and the site URL. Turns out I had both URL’s pointing to “localhost”, so I just switched them to point to the local address of the development box. Once I did that everything worked perfectly.
The lesson here is this, when faced with a challenge it is tempting to leap to a complex solution but often if we take a step back we find the solution is much simpler than we thought. Remember to keep it simple, you’ll save yourself a lot of stress in the long run.