10 Steps to Setting-Up Your PC as a Development Server for WordPress

This is your step-by-step guide to setting up a WordPress web development environment on a PC using XAMPP, WordPress 3.x, and Subversion.

XAMPP installs PHP, MySQL, and Apache on your PC turning it into a local web server for development purposes.  Once installed you can begin creating custom WordPress themes and plugins in your own local development environment.

After downloading and installing WordPress on your machine and beginning to work on your custom code you may want to back up your work remotely.  Also, it is not uncommon to have developers spread around the country and/or world working on the same project, so whether you are backing up your brain child or collaborating with others, Subversion (in conjunction with TortoiseSVN) is an excellent solution.

Let’s get started:

  1. Download and install XAMPP on your PC
  2. Open and modify your Apache config file Update: XAMPP is now pre-configured with this option
    • C:\xampp\apache\conf\httpd.conf
    • Enable mod_rewrite in Apache
  3. Open and modify your PHP config file Update: XAMPP is now pre-configured with these options
    • C:\xampp\php\php.ini
    • Enable gd_lib, simpleXML, and mysqli
  4. Open and modify your Windows HOSTS file
    • Modify your Windows hosts file by adding your development domains using notepad
    • File path on Windows XP & Vista: C:\windows\system32\drivers\etc\hosts
    • Add this line to your hosts file, replacing “[domain]” with the name of your development domain (IP and Domian separated by a tab):
      127.0.0.2       dev.[domain].com
  5. Open and modify your XAMPP vhosts file
    • Add your development domains to your httpd-vhosts.conf file
    • C:\xampp\apache\conf\extra\httpd-vhosts.conf
    • Add these lines to your vhosts file, replacing “[domain]” with the name of your development domain:
      <VirtualHost 127.0.0.2:80>
      ServerAdmin me@localhost.com
      DocumentRoot C:\xampp\htdocs\[domain].com
      ServerName [domain].com
      ServerAlias dev.[domain].com
      </VirtualHost>
  6. Restart Apache by opening your XAMPP Control Panel C:\xampp\xampp-control.exe
  7. Create a new database for your development website and add a username and password for your WordPress project
  8. Download and install WordPress
    • http://wordpress.org/download/
    • Create a directory for the new WordPress development site at C:\xampp\htdocs\[domain].com, replacing “[domain]” with the name of your development domain
    • Unzip and move the  files contained within the “wordpress” subfolder to your  newly created folder at C:\xampp\htdocs\[domain].com
    • Modify your WordPress config file C:\xampp\htdocs\[domain].com\wp-config.php to include your database credentials and follow additional setup  instructions contained within the wp-config file
    • Visit your newly created site http://dev.[domain].com/, replacing “[domain]” with the name of your development domain
    • Follow WordPress’ step-by-step installation instructions
  9. Start customizing WordPress
    • Create a theme folder for the custom theme you will be creating in this directory C:\xampp\htdocs\[domain].com\wp-content\themes\my-theme-name
    • Create a plugin folder for the custom plugin you will to be creating C:\xampp\htdocs\[domain].com\wp-content\plugins\my-plugin-name
  10. Use Subversion as a code repository and version control tool for your custom WordPress projects

One thought on “10 Steps to Setting-Up Your PC as a Development Server for WordPress

  1. Before installing WordPress, We need a mini-server installed in our computer like WAMP. One can easily installed and st-up WordPress for business or personal use, no need of special knowledge for that.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>