You are Viewing : HomeserverHow to install portable local server on your windows PC using XAMPP

How to install portable local server on your windows PC using XAMPP

It is definitely not a good idea to work with development files on the main server. There is always a chance of messing up the core files, not to mention the relatively slower load times. One of the primary requirements for web development is to have a local  server installation in your Computer. So, Come on let us have a look..

I will walk you through these easy steps.

  1. Installation and configuration of a local server in Microsoft Windows.
  2. Installation of wordpress on the local server.
  3. Freedom to work anywhere. Making the server portable using either a USB flash drive or Dropbox.

Installing a local web server in windows 7

With XAMPP, it is easy to convert any edition of your windows (XP, Vista, 7) to a powerful local server. It is easier to install a complete server package rather than manually installing the components.  XAMPP is a total local server solution developed by Apachefriends, and comes with Apache, MySQL, PHP + PEAR, Perl, OpenSSL, phpMyAdmin, Webalizer, Mercury, FileZilla FTP Server, SQLite, and WEB-DAV + mod_auth_mysql. And, it is completely free!

  1. Download XAMPP for Windows from the Apachefriends. It comes as a self extracting installer and ZIP archive. Please choose the self extracting installer.
  2. Open the download file [xampp-win32-1.x.x.exe]. Now choose the folder you wish to install XAMPP and click “Install”. No need for a new folder, Installer automatically creates a folder named “XAMPP”. Wait patiently, or go grab a cup of coffee.

  3. After the extraction is done, a series of command prompt windows will appear. First one asks whether to add the shortcuts to Startmenu & Desktop. Press “y”, unless you don’t need them.
  4. Next command window prompts to relocate the XAMPP paths. Definitely press the “y” key. This step is essential.

  5. Now a  command prompt window gives you a choice of portable version of XAMPP(Without drive letters). Default is “n” (No). Choose carefully.
      1. If you choose to install without drive letters(by pressing “Y”), you get the advantage of portability. This allows us to run the servers from a USB flash drive that can be easily carried around.
      2. But if your development is mostly limited to a single pc, then you should probably press “n”. Running the servers as Windows services is available only in this mode.
  6. After your input, the installer starts relocating the files and finishes with the message “XAMPP is ready to use. Press <RETURN> to continue:”. Enter.
  7. Next comes choosing the time zone of the server. Just press “Enter”, unless the time zone is incorrect.

  8. In the next prompt, type “1” to start the XAMPP Control Panel. Now press “x” key to exit the setup.
  9. A new window titled “XAMPP Control Panel Application” will appear. Make sure “Svc”(Service) checkboxes are checked on the left of Apache and MySQL and click “Start” on the right of both Apache and Mysql.
  10. Check the Message log panel at the bottom of the application. It should say “Apache service started. “ , “MySQL service started” and “Done”. Oh, Yeah! we did it! Winking smile

Usage

I have installed XAMPP, so what now?

Well, open a browser and type “http://localhost” (http://localhost and http://127.0.0.1 are the same) and press enter. XAMPP splash screen will appear now. Click the language of your preference (e.x. English).

Configuring the XAMPP MySQL server

WordPress and most web software use MySQL database tables to store their data. Primary requirement for those software is a new empty MySQL database. XAMPP comes with phpMyAdmin, one of the easiest and best MySQL administration tools available. It can be accessed through the URL, “http://localhost/phpmyadmin”.

Securing the MySQL server

MySQL that comes with XAMPP is insecure with no root(administrator) password. For security reasons, it is definitely recommended to set the root password. Or maybe even create a new database user. Believe me, paranoia is good (here).

Once the phpMyAdmin loads, click the tab “privileges” and then scroll down until you see a box titled “Change password”. Enter the password in the password boxes(twice) and click “Go”. Your MySQL is now more secure.

Adding a new database

  1. Click the home iconphpMyAdmin Home icon (below the phpMyAdmin logo in the sidebar) to get to the home screen.
  2. Enter a database name as “wp” in “Create New Database”. Leave the other options as they are and click button labeled “Create”. A new database will be created now.
  3. To make this simple, We shall use the root account with the password. Actually creating a new user with password is highly recommended. (You can do it through Privileges –> Add a new user –> enter the username, password, check all –> Go). Go through all the un blurred options in the following screenshot.

  4. Your database should now read “wp(0)”. The number denotes a new database with empty tables. You are ready to install wordpress (or any database driven web application) now.

Continue reading the next page..