I like to develop in a localized environment where I have to do minimal setup and configuration on the remote server when it's time to go live. Working with WordPress makes it very easy to do this and it's a breeze to setup with virtual hosts and the free XAMPP stack.
Why do this? It makes it very easy to move over the WordPress database when it's time to go live. Developing locally is always in your best interest. This method is preferred over 'going commando' because you can keep better control over your code and it's faster to develop. Plus a whole slew of other reasons that you can Google if you feel like it. Let's get started on setting up your WordPress install to use XAMPP's virtual hosting capabilities.
1. Open your Windows Hosts file by clicking on My Computer and navigating to "\Windows\system32\drivers\etc\"
2. Add the following to the bottom of the hosts file by using your text editor of choice. Notepad will work just fine.
127.0.0.1 somesite.com
127.0.0.1 www.somesite.com
Note: Be sure to replace "somesite" with your actual WordPress website domain name
3. Now navigate to your XAMPP httpd-vhosts.conf by navigating to: C:/XAMPP/apache/conf/extras
4. Uncomment the following line:
NameVirtualHost *:80
5.Add the following at the bottom of the file and save the file before you close it:
<VirtualHost *:80> DocumentRoot “E:/xampp/htdocs/” ServerName localhost ServerAlias localhost </VirtualHost> <VirtualHost *:80> DocumentRoot “E:/xampp/htdocs/somesite” ServerName www.somesite.com ServerAlias www.somesite.com </VirtualHost> <VirtualHost *:80> DocumentRoot “E:/xampp/htdocs/somesite” ServerName somesite.com ServerAlias somesite.com </VirtualHost>
Wait! One last thing... Now restart Apache and MySQL (using XAMMP) and you should be good to go when you navigate your browser to the url you specified for your WordPress installation using the tutorial above (once you restart the services). If you have any comments or questions be sure to use the comment box below or the Contact DLOCC.
Related posts:
- WordPress List Subpages Even if On Subpage I'm building a new site and the navigation on it requires me to use a different bit of code for parent and child pages. I thought I'd share the code for those out there building a similar navigation. Here's a handy bit of code that you can use to display all subpages on a subpage. [...]...
- WordPress: If URL is Homepage then do this… Question: In WordPress how to I make sure the page loaded is the homepage URL and display some data if the standard WordPress Conditional Tags are not working for my theme?! Answer: Here's a quick snippet of code that will give you an option to do something if these WordPress basic conditional tags are not [...]...
- GoDaddy WordPress Sites Infected by HolasionWeb Malicious Code Have you gotten calls from your clients hosted on GoDaddy about their WordPress site's being 'hacked'? Or perhaps this happened to you yourself. It seems there's a new report of thousands of WordPress sites being infected by malicious javascript inserted on their WordPress website. It's not everyday that WordPress gets 'hacked' by something/one. Today one [...]...
- WordPress Lavalamp Navigation Tutorial Lavalamp is an awesome jQuery plug-in that makes really cool effects for WordPress-based menus and navigation links, and as a bonus it is very lightweight. It can be a bit tricky to implement in WordPress, but after you read this tutorial hopefully you'll be implementing it with ease. Follow along and let's get your site's [...]...
- WordPress Fix: Attribute “role” is not a valid attribute I like to design websites that are W3C Compliant. Your WordPress theme may require some tweaking to be valid. One error I kept receiving was: Attribute "role" is not a valid attribute. Did you mean "frameborder" or "scrolling"? I will show you how to correct this error. Simply put, to correct the error we are [...]...
-
http://www.jonathlee.com Jonath Lee
-
http:/www.dlocc.com Devin Walker
-
http://www.jonathlee.com Jonath Lee
-
Alan-john40
-
Pip






