Ever wanted to set up a local copy / version of WordPress, Magento, Joomla, Drupal or any other PHP / MySQL Content Management Framework on you own PC?
In this guide, I will show you how to install a local web server on your own machine.
Any decent web server requires at least 3 minimum components, Apache (the web server), MySQL (for databases) and/or PHP (for interpreting PHP scripts).
You can manually install all these components on Windows, Mac or Linux (respectively known as a WAMP, MAMP or LAMP stack), which requires a bit of manual tweaking or you can just simply download and install XAMPP.
What is XAMPP?
Straight from the website:
XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer. It’s that easy.
- MariaDB (a MySQL replacement)
- XAMPP Control Panel (screenshot above)
- Mercury Mail Transport System
- FileZilla FTP Server
- Strawberry Perl Portable
- Windows: Windows 2008, 2012, Vista, 7, 8 (XP or 2003 not supported)
- Linux: Most all distributions of Linux are supported, including Debian, RedHat, CentOS, Ubuntu, Fedora, Gentoo, Arch, SUSE.
- Mac: Mac OS X 10.6 or later.
Once you had downloaded and installed the package, your webserver will be ready to rock and roll on your local machine.
How To Access Your Local Web Server?
Open up your web browser and type in the following address in the address bar:
Your localhost address is what your web server is interpreting and spitting back at you as the user. It looks to your webserver’s local files and database.
Where Are My WebsERVER’s Local Files Stored?
This primarily depends on where you installed XAMPP on your machine, but usually it can be found here:
For starters, place your new website’s files in a new folder and update the address, ie.
Your HTML and PHP files go under (file system): C:\xampp\htdocs\mytestwebsite
Your localhost URL (browser): http://localhost/mytestwebsite
That’s it! Now get playing with those PHP scripts and MySQL databases!