Few are able to install and configure Apache, MySQL And PHP. And develop on PHP I already want it right away and right now. And so as not to waste time studying fine tuning Apache, MySQL And PHP, have come up with ready-made assemblies of Web servers that simplify the entire installation and configuration process. But I think that for professional development you still need to learn how to install and configure a Web server yourself. Of course, if you already have paid or free hosting, you can use it to test your projects, but this will create a bunch of unnecessary problems in the first stages of development, you will need constant and high-speed Internet access, and good hosting. And in order not to have to worry about hosting, you can still develop everything on a local computer, which is why you actually need an installed Web server. XAMPP- this is one of the few development kits that is cross-platform, in other words, it will work well on both Windows and Linux, Mac OS X, Solaris.
XAMPP- an excellent solution for a novice web programmer, since, again, you won’t have to worry about settings, and when you read some book on PHP (for example, the one I wrote about earlier -) you will immediately be able to try all the examples from the book in practice, while without going into the details and subtleties of setting up the Web server.

Today I will try to talk about XAMPP, how to install it and briefly about how to work with it.

XAMPP is more common among the English-speaking population, while it is very common among Russian-speaking users Gentleman's set Denwer. Why did I choose XAMPP? I just think XAMPP is more convenient to use, and it also attracts good support, that is, the XAMPP developers always make sure that when new version of one library or another, the Web server kit was updated. XAMPP does not create any additional disks, and contains a very wide selection of libraries that can be added.
By the way, the abbreviation XAMPP means - X(any of the OS: Linux, Windows, Mac OS, Solaris), A pache M ySQL P HP, P erl. We will consider for Windows OS, for which there are two versions of XAMPP Windows and XAMPP Lite. They differ only in the content of the packages; the Lite version has fewer different libraries.

XAMPP Windows 1.7.3

This version contains the following libraries:

  • Apache 2.2.14 (IPV6 enabled)
  • PHP 5.3.1 (PEAR, Mail_Mime, MDB2, Zend)
  • Perl 5.10.1 (Bundle::Apache2, Apache2::Request, Bundle::Apache::ASP, Bundle::Email, Bundle::DBD::mysql, DBD::SQlite, Randy Kobes PPM)
  • XAMPP CLI Bundle 1.6
  • XAMPP Port Check 1.5
  • XAMPP Security 1.1
  • SQLite 2.8.17
  • SQLite 3.6.20
  • OpenSSL 0.9.8l
  • phpMyAdmin 3.2.4
  • ADOdb v5.10
  • FPDF v1.6
  • Zend Framework 1.9.6 Minimal Package (via PEAR)
  • Mercury Mail Transport System v4.72
  • FileZilla FTP Server 0.9.33
  • apc 3.1.3p1 for PHP
  • eAccelerator 0.9.6-rc1 for PHP
  • Ming 0.4.3 for PHP
  • rar 2.0.0-dev for PHP
  • Xdebug 2.0.6-dev for PHP
  • libapreq2 v2.12 (mod_apreq2) for Apache

System requirements:

  • 128 MB RAM
  • 320 MB free hard disk space

As I already said, the Lite version is distinguished by the absence of some libraries, and accordingly takes up less disk space, and installation file weighs less. According to the developers, the Lite version is not updated as often as the full version.

XAMPP Lite 1.7.3

  • Apache 2.2.14 (IPV6 enabled)
  • MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc
  • PHP 5.3.1 (PEAR)
  • Miniperl 5.10.1
  • XAMPP Control Version 2.5.8 (ApacheFriends Edition)
  • XAMPP CLI Bundle 1.6
  • XAMPP Port Check 1.5
  • XAMPP Security 1.1
  • SQLite 2.8.17
  • SQLite 3.6.20
  • OpenSSL 0.9.8l
  • phpMyAdmin 3.2.4
  • msmtp 1.4.19 (a sendmail compatible SMTP client)
  • Webalizer 2.21-02 (with GeoIP lite)
  • Ming 0.4.3 for PHP
  • PDF with pdflib lite v7.0.4p4 for PHP

System requirements:

  • 28 MB RAM
  • 192 MB free hard disk space
  • Windows 2000, XP (Server 2003), Vista (Server 2008), 7
  • all 32 bit OS (64 should work)

Let me remind you if I said it, and I’ll say it if I haven’t already said that XAMPP is completely free and distributed under the GNU GPL license. As you can see from the list of libraries of both versions, to start working with PHP, both would be suitable Lite version, but you need to think about the future and the fact that in the future you may need more libraries, so we will consider the version XAMPP Windows 1.7.3.

Installation

In order to start the installation process, you need to download the installation file or archive, in this case we will use the installation file located at the following address - http://www.apachefriends.org/download.php?xampp-win32-1.7.3.exe.
I hope you have already downloaded the installation file, because there is nothing complicated in the installation process itself, everything is quite simple, you only need to click on the button Install. Before installation, you can change the installation path, I left the default C:\, while XAMPP itself will be installed in the directory - C:\xampp.

In fact, this is a self-extracting archive, so we just wait while the unpacking (installation) process takes place.

After this the file setup_xampp.bat will start automatically, and you should have a command prompt open where the installation continues XAMPP. Here you are asked whether to create a shortcut on the desktop, select "y" if you agree and "n" if you disagree and then click Enter.

Now we are asked if the path to XAMPP, press "y" if you agree that XAMPP was in the directory C:\xampp, if you don’t agree, then click “x” and start all over again. Click "y" and then the key Enter.

In the next window you can select the installation type - portable version XAMPP(so that you can transfer it to a flash drive), for this you need to select "y", in this case we press "n" and then Enter, since we are installing on a hard drive.

The next window will display a list of what has been installed, including what we need, namely PHP, MySQL, Apache. Here they ask you to press Enter to continue, which is exactly what we do.

On next step we will receive a message stating that the time zone was automatically determined and added to the files "php.ini" And "my.ini", in my case - Europe/Helsinki. Click here Enter.

Our kit XAMPP web server installed. At this point, the command line displays several actions to choose from, namely:

  1. launch XAMPP Control Panel
  2. move XAMPP (current path: C:\xampp)
  3. disable HTTPS (SSL)
  4. disable Server Side Includes (SSI)
  5. enable IPv4 only (current: IPv4/6(automatic))
  6. disable mod_perl
  7. disable Apache:ASP

Here, of course, you can select any menu item at your discretion. In order to launch XAMPP Control Panel you need to select item No. 1 and click on Enter, or choose x(as I did) to exit and then launch the shortcut on the desktop - XAMPP Control Panel. If you installed without creating shortcuts, then you need to go to the C:\xampp directory and run xampp-control.exe. The same directory contains shortcuts for launching individual modules.

After launching XAMPP Control Panel one way or another, you should see the following:

Usage

XAMPP very easy to use, and NetBeans integrates well (I wrote about this IDE earlier -). IN XAMPP very comfortable Control Panel,it is easy to use and contains everything you need for comfortable work and creating masterpieces in programming.

In the screenshot above you can see the List of modules ( Modules)namely: Apache, MySQL, FileZilla, Mercury, Tomcat. In order to launch a particular module, you need to press the button located next to the module, namely Start. In our case, we will launch Apache and MySQL. If you want to run modules like Windows services and so that they are automatically executed after loading the OS, you need to check the box next to the module name Svc. Modules are installed as Windows services when the checkbox is checked and removed when the checkbox is unchecked Svc.

All buttons are located on the right useful functions, namely:
Shell- Launches command line, in which you can work with the server

Setup— here are some XAMPP settings, which are collected in a small menu, I wrote about them above

Port-Check— by clicking on this button you can check the ports required for the Web server

Explore— after clicking this button, the directory in which XAMPP is installed will be opened (C:\xampp)
SCM- a window for managing Windows services will open here
Refresh— when you click on this button, the state of all modules will be updated, please note that they will be updated and not reloaded
Help— here is a little help on working with XAMPP Control Panel
Exit- exit from XAMPP Control Panel, please note that this will simply close Control Panel all modules that have been enabled will remain in working order
If you just close the window XAMPP Control Panel then an icon remains in the tray, and when you hover over it, information about running modules is displayed. When you click on the tray icon right click mouse, will happen Refresh XAMPP.
When you launch the modules you need, the buttons with the inscription will become active Admin. When you click on any of them, the default browser is launched and the administrative panel of a particular module is launched in it. For example, this is what the welcome page looks like XAMPP, after pressing the button Admin near Apache. Here you need to select the language that you like best, in older versions Russian is also available, in this case we select English.

After selecting the language, the XAMPP web interface will appear. In which the first page welcomes us and congratulates us on installing the Web server kit.

The web interface has a lot of useful things, there is a fairly large menu in which:
Welcome- welcome page
Status— here you can check the status of all components, which components are working and which are not working

Security- here are all kinds of security settings, trusted settings are marked in green, completely unprotected settings are marked in red, and yellow means that there is no way to determine the status, here you can find a list of XAMPP ports, and recommendations for eliminating unprotected components, there is also an address (http://localhost/security/xamppsecurity.php) where you can change the password for root (MySQL), set a password for the XAMPP directory, and set the access method to phpMyAdmin

Documentation— here is On-line documentation for various XAMPP components

Components- here is a list of all components that XAMPP contains, and links to the authors of these components

phpinfo()— displays information about PHP, namely about settings, extensions, PHP versions etc.

pearinfo()— displays information about PEAR

perlinfo()- displays information about PERL

aspinfo()— displays information about ASP

Demos— in this section there are several scripts that demonstrate the operation of certain XAMPP components, namely:
CD Collectionsimple program With using PHP, MySQL, FPDF, in which you can add, delete and generate a list of your CDs in PDF

Biorhythm- a program showing biorhythm graphically, using PHP, GD

Instant Art- a program demonstrating PHP work, GD, FreeType

Flash Art— demonstration of the use of PHP+MING

Phone Bookphone book using PHP and SQLite

ADOdb- using ADOdb

Guest Book- a simple guest book in Perl

Tools— this section contains additional utilities that can significantly help in the development of a particular software product
phpMyAdmin- application on PHP, which provides a web interface for working with MySQL, this application can be called from XAMPP Control Panel by pressing a button Admin next to the MySQL module, which is actually very convenient and speeds up startup phpMyAdmin

Webalizer— statistics on the site’s performance with charts

Mercury Mail is a program that allows you to send and receive mail both on one computer and on a local network.

FileZilla FTP— FTP server

In general, XAMPP has everything you need to develop applications; if you need something more, you can turn to the add-ons.

Translation of XAMPP documentation

Passwords:

  • MySQL:
    User: root
    Password: (no password by default)
  • FileZilla FTP:
    User: newuser
    Password: wamp
    User: anonymous
    Password: [email protected]
  • Mercury:
    Postmaster: postmaster (postmaster@localhost)
    Administrator: Admin (admin@localhost)
    TestUser: newuser
    Password: wamp
  • WEBDAV:
    User: wampp
    Password: xampp

About safety (a must read!)
XAMPP is made to be completely open source, this was done so that developers can do whatever they need, and for this reason it is not recommended to use XAMPP as it is out of the box in production, as it is practically unsecured.

List of the most vulnerable places in XAMPP:
The MySQL administrator login (root) does not have a password by default.
MySQL daemon, available via local network.
PhpMyAdmin, accessible via local network.
Examples are available via local network.

These and other security flaws can be fixed on the following page:
http://localhost/security/

Passwords for MySQL and PhpMyAdmin, and passwords for the XAMPP directory can also be configured at the above address.

MySQL Notes:
As mentioned above, by default in MySQL there is no password for the user with the “root” login. To be able to access databases from PHP MySQL data you need to write the following:

mysql_connect ("localhost" , "root" , "" ) ;

mysql_connect("localhost", "root", "");

To set a password to access MySQL, you need to use MySQL Admin.
In order to set the “secret” password for the “root” user on the command line, you need to write the following:

\xampp\mysql\bin\mysqladmin.exe -u root -psecret

If you change the password, you will have to reconfigure PhpMyAdmin to use New Password, if you do not reconfigure, then access to the databases will be closed. To change PhpMyAdmin settings you need to open the config.inc.php file, which is located in the \xampp\phpmyadmin\ directory and change the following lines:

$cfg["Servers"][$i]["user"] = "root"; // MySQL user $cfg["Servers"][$i]["auth_type"] = "cookie"; // HTTP Authentication

After this, in order to access PhpMyAdmin, you will first be asked for the password for the ‘root’ user.

CPAN/PEAR:

CPAN and PEAR are pre-installed in the OS and are basic. If you need additional packages, you need to use the XAMPP Shell utility (xampp_shell.bat), for which you need to write the following on the command line and install them using command line utilities:

  • cpanp i foo
  • pear install foo

If you don't have a VC6 compiler, you can use "ppm" instead of "cpanp" to install binary packages.

General directories

\xampp\anonymous For anonymous FTP access you need to upload to this directory.
\xampp\cgi-bin For CGI scripts.
\xampp\htdocs This is the main directory where you need to create your projects. For example, I do this: I create a directory in \xampp\htdocs for example blog (C:\xampp\htdocs\blog) and write the main project files here, after which my blog will be available at http://localhost/blog/ and So for each project I create a separate directory.
\xampp\MercuryMail\MAIL Mailboxes.
\xampp\mysql\data MySQL databases.
\xampp\webdav Directory for WebDAV access (if enabled).

Configuration files

\xampp\apache\conf\httpd.conf The main configuration file for Apache. If you need other Apache configuration files, they are stored in the \xampp\apache\conf\extra\ directory.
\xampp\FileZillaFTP\FileZilla Server.xml Configuration file for FTP servers FileZilla. It is associated with "FileZilla Server Interface.exe" (which can be launched by clicking the "Admin" button in the XAMPP Control Panel).
\xampp\MercuryMail\mercury.ini Configuration file for the Mercury SMTP server. It is associated with "mercury.exe" (which can be launched by clicking the "Admin" button in the XAMPP Control Panel).
\mysql\bin\my.ini Configuration file for the MySQL server.
\xampp\php\php.ini Configuration file for PHP.
\xampp\phpMyAdmin\config.inc.php Configuration file for phpMyAdmin.
\xampp\sendmail\sendmail.ini Configuration file for msmtp (sendmail compatible interface).
\xampp\webalizer\webalizer.conf Configuration file for Webalizer.

Log files (.log)

— to check the FTP server, you can use the FileZilla FTP manager
  • — about NetBeans
  • - how to install NetBeans
  • — about the FPDF library
  • — to check the created files with the FPDF library, you can use the Foxit Reader program
  • Good luck using XAMPP.

    \xampp\apache\logs\error.log Apache error log file. Additional files may be in the same directory (if enabled).
    \xampp\FileZillaFTP\Logs FileZilla FTP server error log file (if enabled).
    \xampp\MercuryMail\LOGS\ Subdirectories of this directory contain log files from several Mercury SMTP server modules.
    \xampp\mysql\data\mysql.err MySQL error log file. Additional files may be in the same directory (if enabled).

    On your own local computer using the XAMPP tool and why it is needed at all.

    Why install WordPress on your local computer?

    Before we find out “how” to do this, let’s figure out “why” this is needed and how it will help in working with a WordPress site.

    Fast file transfer

    You probably have to download a considerable number of files, including themes, plugins, etc. This can significantly slow down download speeds, especially compared to how easy it is to copy and paste information, or extract a zip file from one part of the computer to another.

    If you install the version of WordPress for your local computer, you can transfer files, make changes to WordPress, install themes and plugins, and loading pages will not slow down your work with the site.

    You will learn more about WordPress

    If you're just getting started with WordPress and learning about it, then an offline local installation will help you along the way. You will be able to experiment without anyone seeing what exactly you are doing and what changes you are making to the site.

    Develop offline before downloading changes

    Most likely, every developer has at least one local WordPress site. However, if you're just getting started with design or development, then you might be interested in the fact that you can quickly download your entire site to your computer and edit it offline.

    Creating a personal offline blog

    Another reason for going offline could be the ability to run your own private blog. You will have access to all the features of WordPress, including all the plugins that are used for this platform. And no one will ever see your blog online mode.

    As you can see, the reasons for WordPress installations on the local computer many. Now let's figure out how this can be done, and completely free.

    Installing WordPress Locally Using XAMPP

    To use WordPress on your computer, you first need to download the free software XAMPP. This PHP environment development, although there are many other options for using WordPress locally, but this is the best.

    Step 1. Download XAMPP

    This software can be downloaded here, just select suitable option, depending on the operating system on your computer and download the file.

    Step 2. Install XAMPP

    After downloading the appropriate file, start the installation double click mice.

    During the installation process, leave the default settings and click “Next”.

    When it comes to choosing a folder to save XAMPP, you can choose the default folder or create a new one. If you don't know how best to do it, choose the first option.

    We are waiting for XAMPP to install before moving on to the next step.

    Step 3. Launch XAMPP

    Once XAMPP is installed on your computer, select “Start downloading Control Panel now” and click “Finish”.

    After that click "Start" for Apache and MySql:

    At this point, you will usually receive a security alert from Windows, but you don't have to worry about anything. Make sure you click on "Unblock" and your local server XAMPP will be ready to use.

    To check if everything was done correctly, open your browser and go to this address:

    http://localhost

    If XAMPP is configured correctly, then you should see the following:

    Step 4. Create a database for WordPress

    Since WordPress uses a database, we need to create one before installing WordPress. This is done very simply and in just a few steps.

    To get started, switch to the control panel, click on the “Admin” button, and then on “Start” for MySql:

    After this, the phpMyAdmin admin panel should open in your browser:

    Here, click on “Databases”, enter the name of your database (any set of Latin characters) and click on the “Create” button. Since you can create several databases and perform several installations of WordPress on your computer. The main thing is to give the database a name so that you don’t confuse which site it belongs to later.

    When you see a message confirming that the database has been created, you can proceed to the next step.

    Step 5. Download WordPress

    Go to wordpress.org and download latest version WordPress. After downloading the zip file, move it to where you installed XAMPP and save it in the "htdocs" folder.

    Then unzip this file by right-clicking on it and selecting “Extract to current folder”:

    You can give the folder a unique name so that you can distinguish it from others that you will create in the future.

    Step 6. Setting up WordPress

    We've done almost everything. All that remains is to edit and rename one file. In the WordPress directory you just created, find the wp-config-sample.php file and open it with a text editor like Notepad++:

    Edit the data in the highlighted area according to the name of the database you created in step 4.

    Save the file and rename it to wp-config.php, removing –sample from its name.

    Step 7. Install WordPress

    To install WordPress, enter the address in your browser: http://localhost/wordpress/, where “wordpress” is the name of the folder you created in step 5. Once the page loads, you will see the following:

    Then enter the required details, click on “Install WordPress”, and then an offline WordPress installation will appear on your computer.

    If you want to install themes or plugins, you can do so through the WordPress admin as you would online, or you can copy the file to the appropriate folders on your computer:

    • Themes: c:\xampp\htdocs\wordpress\wp-content\themes
    • Plugins: c:\xampp\htdocs\wordpress\wp-content\plugins

    If you can't access WordPress offline using these links, make sure XAMPP is active and Apache and MySql are running.

    If you want to upload a website online for offline use, or vice versa, then this will help you free plugin Duplicator.

    To develop and test websites or web applications, they usually use a local Web server, and after development they transfer it to a production server. Therefore, today I propose to consider the possibility of installing a local web server on the Windows 7 operating system, and since we have a site for beginner developers, we will use finished assembly web server as an example XAMPP.

    And we will start with the basics, i.e. We will find out what a web server assembly is, what it consists of, why it is needed, in particular, we will analyze the XAMPP assembly, install it and, of course, check its operation.

    What is a Web server build?

    Building a Web Server– this is a certain set of applications necessary for the functioning of sites, after deployment of which you can immediately proceed to their development, without being distracted and without delving into the settings of each component of the web server.

    A web server assembly usually includes at least 3 components: the HTTP server itself, a website development tool, i.e. programming language libraries, interpreter, etc., and a database management system. These builds use free software, so the most common components are the Apache web server, MySQL DBMS, languages PHP programming and Perl.

    If we talk about why such an assembly is needed at all, since you yourself understand that all this is installed and configured separately, then it is needed mainly to make life easier for novice developers, so that they can simply install one program and immediately start, say, learning to program (create websites). For example, as the operating system of our local web server we will use Windows 7, since it is the Windows OS from Microsoft widely used here in Russia.

    Of course, after the development of a site or web application is completed, it is necessary to transfer everything to a production server, which will most likely use the operating system on Linux based. For example, you and I have already considered the possibility of installing and configuring a full-fledged, working web server on CentOS 7.1, where we separately installed and configured each of the web server components; there we used Apache, PHP and MySQL. Also, if anyone is interested in installing the MySQL DBMS on Windows, we have discussed this in detail here.

    Note! It is not recommended to use a web server assembly on production hosting for websites, especially since the developers themselves warn that these assemblies are not intended for implementation in production.

    The most popular web server builds include: Denver, Open Server, XAMPP, WampServer. As the title of the article suggests, today we will be looking at XAMPP.

    What is XAMPP?

    XAMPP is a free, cross-platform web server build that includes Apache, MySQL PHP and Perl.

    As you might guess, XAMPP is an abbreviation:

    • X – means there is an assembly for everything OS(Windows, Linux, OS X);
    • A - Apache;
    • M – MySQL;
    • P – PHP;
    • P - Perl.

    Lastly, for today ( June 2015), the XAMPP build for Windows includes the following software: Apache 2.4.12, MySQL 5.6.24, PHP 5.6.8, phpMyAdmin 4.3.11, OpenSSL 1.0.1, XAMPP Control Panel 3.2.1, Webalizer 2.23-04, Mercury Mail Transport System 4.63, FileZilla FTP Server 0.9.41, Tomcat 7.0.56 (with mod_proxy_ajp as connector), Strawberry Perl 7.0.56 Portable.

    Where to download XAMPP?

    You can download this assembly from the download page of the official website - https://www.apachefriends.org/ru/download.html

    And since we will install XAMPP on Windows, we will accordingly download the distribution kit for this operating system, for example, I want to download the XAMPP version with PHP 5.6.8 for this, and click the corresponding link.


    After which we will download a distribution kit of 107 megabytes in size.

    This build supports operating systems Windows systems, starting with Vista.

    Installing XAMPP

    Let's start installing the XAMPP Web server assembly, it is simple, so there should be no problems.

    Step 1

    Run the downloaded file xampp-win32-5.6.8-0-VC11-installer.exe. The first window of the installation program is the welcome window, click “ Next».


    Step 2

    Next, select the components that need to be installed, by default everything is selected, but if you do not want to install something, i.e. You don’t need this, then you can uncheck the corresponding item, for example, I don’t need Perl, click "Next".


    Step 3

    Then select the directory in which we will install XAMPP, I will leave it as default, click “ Next».


    Step 4

    At this step we can leave or uncheck the “ Learn more about Bitnami for XAMPP", I unchecked the box, click " Next».


    Step 5

    Everything is ready for installation, click “ Next».


    The installation has started.


    After the installation is complete, we will be prompted to immediately run “ Control Panel", click " Finish».


    That's all, we have launched the XAMPP control panel.


    Launch and check the operation of Apache, PHP and MySQL

    As we can see, immediately after installation all services are not running, so we start them with the “ Start».


    Those services that are in this moment launched.

    First, let's check the operation of Apache, to do this we simply type localhost in the browser, and if we see the following picture, then everything is in order.


    To test MySQL and PHP, let's write a simple PHP script that will test the connection to the MySQL database. To do this, create a test folder in the C:\xampp\htdocs\ directory; by the way, everything that is in the htdocs folder can be deleted. In the test folder, create a file index.php with the following code;

    Database server unavailable

    "; exit(); ) //Checking database availability if (!@mysql_select_db($dbname,$dbconn))( echo "

    Database unavailable

    "; exit(); ) //Simple query, find out the MySQL version $VERSION = mysql_query("SELECT VERSION()"); if(!$VERSION)( echo "

    Error in request

    "; exit(); ) echo mysql_result($VERSION, 0); ?>

    We save and in the browser access the address http://localhost/test/ in response we should receive the MySQL version.


    If you were surprised by this, it means that Apache and PHP and MySQL are up and running.

    Now I’ll tell you a little about the XAMPP control panel. You can launch it through the menu “Start->All Programs->XAMPP”.


    After launch, an icon for quick control, i.e. starting and stopping services.

    I propose to end here, since everything is ready for developing websites based on Apache, MySQL and PHP. I would like to note once again that this assembly is suitable exclusively for developing and testing web applications; it is not recommended to use it as a working platform for websites. Good luck!

    Updated:

    Start blogging on WordPress necessary on a local server, since it is on the local server that you can test and configure everything that you will need in the future when transferring the blog to the hosting server. I won’t recommend installing Denver, because, in my opinion, it’s better to choose another, more open server for use on home computer. I chose XAMPP and I have never regretted it, since it is a very powerful server with all the necessary functions and easy installation.

    Let's go to the site XAMPP and download the required version of the server on this page - http://www.apachefriends.org/en/xampp-windows.html. I will talk about installing and configuring the version 1.8.3 , since it is the latest at the time of updating this article. However, do not rush to download the latest version of the server. I'll explain why. It is very doubtful that your hoster will have all the latest versions installed required components, such as PHP And MySQL. Therefore, when transferring a blog to a hoster, certain problems may arise. This is understandable - if you have tested everything for PHP versions 5.5.9 , and the hoster has it installed PHP versions 5.2.17 , then compatibility problems are quite possible. If you know which versions PHP And MySQL installed by your hoster, then you can XAMPP, in which the components of the exact versions you need will be installed. If you don’t know which hoster you will host your blog with, then download and install the latest version of the server.

    In fact, all versions XAMPP almost identical - only the versions of the components included in it differ. Therefore, this article will be relevant no matter what version XAMPP you will install. I still use the version server for personal needs 1.7.1 , since this version contains the most suitable components for me. But again, in the article I will look at installing and configuring the server XAMPP versions 1.8.3 .

    I apologize for the large number of screenshots. Any more or less knowledgeable person will be able to install and configure this server on his computer, but this article is intended primarily for beginners and describes in great detail the entire process of installing and configuring a server XAMPP, and the engine WordPress.

    Have you downloaded it? Let's launch the installer. If you have any antivirus running, you will see the following warning:

    This message tells you that if the antivirus is running, the server installation may take a long time. If you have enough powerful computer, then click on " Yes", without disabling the antivirus.

    The following window will appear:

    This is simply a welcome window informing you that the installation has begun. Click on the button " Next", after which you will see the window:

    This is the selection of server components that will be installed. By default, all components are selected. But it is not at all necessary to install all components on the local server; it is better to limit yourself to the necessary minimum. Approximately as shown in the screenshot. Have you chosen? Click on the button " Next", now you need to select the installation folder:

    I am using the folder " C:\server", you can install the server in another location. Have you chosen? Click further on " Next", the following window will appear:

    Essentially, this is just an advertisement for plugins for XAMPP, with which you can automatically install many engines like WordPress And Joomla. Of course, this is convenient, but I do not recommend using them - a local server is also needed because you need to learn how to install the engines yourself. If an automatic installer does this for you, then what will you learn and why do you need a local server at all? So I advise you to uncheck advertising and click further on " Next":

    This window tells you that everything is ready for installation. Click on " Next" and enjoy the installation process:

    The installation process will end when this window appears:

    Click on " Finish", after which the server control panel will launch:

    When you see this panel for the first time, you may get confused, as there are too many buttons in it. But don't be alarmed, everything is simple here. All we need here is to press two buttons - start the server Apache and databases MySQL. Just click on the buttons " Start" opposite them. If everything started without errors, then the control panel will look like this:

    Essentially, your local server is already running, now you need to configure it. To do this, open the link in your browser " http://localhost":

    You will be automatically redirected to the language selection page:

    Russian language in XAMPP no, so we choose English. Don't be alarmed by the lack of Russian translation; after a little server setup, you'll never have to come here again. After clicking on " English"The following initial welcome page will open:

    It's simple - enter the password 2 times and press the button "Password changing". If your computer is connected to a local network, then you must also set a password for the directory XAMPP:

    If you do not access the Internet through a public local network, then this setting can be neglected.

    Actually, this is all about setting up the server itself XAMPP completed. Now let's start installing it WordPress. First we need to create a database MySQL, to do this, open the server control panel and click on the " Admin" against " MySQL":

    Your browser will open the login page. phpMyAdmin:

    As user enter " root", and as the password is the password you set to access MySQL. Entered - go to phpMyAdmin. Click on the button " Database" and create new base data called " wordpress" (required in encoding utf8_general_ci):

    After pressing the " Create" a message will appear:

    Now let's proceed directly to installing the engine WordPress. First of all, you need to download it. Go to the official website http://ru.wordpress.org and download the latest version of the engine there. Now go to the folder " C:\server\htdocs" and create a folder there with a name that will open your local blog. For example, create a folder there " blog" and copy the unpacked distribution files there.

    That is, the engine files should be located along the path " c:\server\htdocs\blog".Not a folder" wordpress" should be on this path, and the engine files themselves. Be careful here:

    Now open the file " wp-config-sample.php" in any text editor with support for saving text in encoding UTF-8 without BOM, such as Notepad++ () and edit it something like this:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 /** Database name for WordPress */ define ("DB_NAME" , "wordpress" ) ; /** MySQL username */ define ("DB_USER" , "root" ) ; /** Password for the MySQL database */ define ("DB_PASSWORD" , "123456789" ) ; /** MySQL server name */ define ("DB_HOST" , "localhost" ) ; /** Database encoding for creating tables. */ define ("DB_CHARSET" , "utf8" ) ; /** Matching scheme. Don't change if you're not sure. */ define ("DB_COLLATE" , "utf8_general_ci" ) ; /** Unique keys and salts for authentication. */ define("AUTH_KEY" , "%5hT>mnVWZ|chrP|Vx(Pt2DA9Yu_Iyntgii`") ; define("SECURE_AUTH_KEY" , "|;.%IZ-A_=qMtHCnrEA7Ka!F]s2~X:Y)XJ6d") ; define("LOGGED_IN_KEY" , "RL13)Io(/ToX-1/%`/]IDO(f,o*uqp`Q)`,G") ; define("NONCE_KEY" , "/85B~(l&&W.x:MeoNFB!2BQ$:hX4j|AHxA6o") ; define("AUTH_SALT" , "$V@EM>VGDoYB0:mJq%$Qh||A;V/w?T,BkT`") ; define("SECURE_AUTH_SALT" , "U>uPV|#D#o-FKwwKvHzAdiCh^F5S?o|v^;]u") ; define("LOGGED_IN_SALT" , "L142y.eKU/Ba>gjm5S0_%|2;I&Ou6&;AGu];") ; define("NONCE_SALT" , "OBve/86egiO_(=m#c9I!zSE5UgWZ-NsX5V)z") ; /** Prefix for tables in the WordPress database. */$table_prefix = "wp_" ; /** WordPress localization language, default English. */ define ("WPLANG" , "ru_RU" ) ; /** For developers: WordPress debug mode. */ define ("WP_DEBUG" , false ) ; /* That's all, no further editing. Good luck! */ /** Absolute path to the WordPress directory. */ if ( ! defined ( "ABSPATH" ) ) define ( "ABSPATH" , dirname (__FILE__ ) . "/" ) ; /** Initializes WordPress variables and includes files. */ require_once (ABSPATH . "wp-settings.php" ) ; ?>

    mnVWZ|chrP|Vx(Pt2DA9Yu_Iyntgii`"); define("SECURE_AUTH_KEY", "|;.%IZ-A_=qMtHCnrEA7Ka!F]s2~X:Y)XJ6d"); define("LOGGED_IN_KEY", "RL13)Io (/ToX-1/%`/]IDO(f,o*uqp`Q)`,G"); define("NONCE_KEY", "/85B~(l&&W.x:MeoNFB!2BQ$:hX4j|AHxA6o" ); define("AUTH_SALT", "$V@EM>VGDoYB0:mJq%$Qh||A;V/w?T,BkT`"); define("SECURE_AUTH_SALT", "U>uPV|#D#o -FKwwKvHzAdiCh^F5S?o|v^;]u"); define("LOGGED_IN_SALT", "L142y.eKU/Ba>gjm5S0_%|2;I&Ou6&;AGu];"); define("NONCE_SALT", "OBve/ 86egiO_(=m#c9I!zSE5UgWZ-NsX5V)z"); /** Prefix of tables in the WordPress database. */ $table_prefix = "wp_"; /** WordPress localization language, default English. */ define(" WPLANG", "ru_RU"); /** For developers: WordPress debugging mode. */ define("WP_DEBUG", false); /* That's all, no further editing. Good luck! */ /** Absolute path to the WordPress directory . */ if (!defined("ABSPATH")) define("ABSPATH", dirname(__FILE__) . "/"); /** Initializes WordPress variables and includes files. */ require_once(ABSPATH . "wp-settings. php"); ?>

    Where do you specify the database name (mine is " wordpress"), username in MySQL(This " root") and password (the one you set, I have this 123456789 , but I hope that you did not use such a simple set of numbers as your password). Don't forget to set your own keys and salts for authentication. Save this file under the name wp-config.php. Mandatory encoding UTF-8 without BOM– remember that any engine files must be edited only in this encoding, otherwise your blog will simply stop opening.

    Since I copied the distribution files WordPress to the folder " C:\server\htdocs\blog", then in order to continue the installation I must open the link in the browser http://localhost/blog/:

    The installation page will open WordPress, nothing complicated:

    Click on " Install WordPress" and after a few seconds we get:

    Click on " To come in" and rejoice at the installed blog:

    Server XAMPP installed, WordPress installed, you can start setting up your blog.

    A few notes. The first is if you installed only those server components that I chose (that is, without Mercury Mail Server), then your server will not actually send mail. All outgoing emails will be saved in the format txt in folder mailoutput(that is, I have this folder " c:\server\mailoutput"). This is very convenient when you need to check the sending of emails by some plugin to different addresses - they are not actually sent, but you can still control the work.

    Second, sometimes you need to configure XAMPP so as not to access your blogs through localhost. That is, not http://localhost/blog, A http://www.blog.ru– and even if no one except you can open such a URL, but you may need it. Let's say, if you are actively filling out a blog on a local server and do not want to manually change all localhost entries in the database after transferring the blog to the hoster (for example, all uploaded pictures on the local server will have an address through localhost). This is done through setting up virtual hosts and it is not too difficult to do.

    First of all, create a separate folder somewhere. Let's say the folder " mysites" (the name doesn't matter). Let's say you created it in the root of the disk and now it has the path " C:\mysites\". In it, create a folder with the name of your domain, say " blog.ru"and there are also subfolders in it" www" And " logs". To folder " www" upload the engine files WordPress. Then you should have the following folder hierarchy:

    Now you need to slightly adjust the server settings. You need to open the file httpd-vhosts.conf in folder " C:\server\apache\conf\extra" and add the following text at the very end:

    NameVirtualHost * :80< virtualhost * :80 > < virtualhost * :80 >CustomLog combined< directory "C:\mysites\blog.ru\www" >Require all granted

    NameVirtualHost *:80 Require all granted

    Just remember to carefully adjust the paths to your own. A small nuance - this code will only work with those versions XAMPP, in which Apache versions 2.4 or higher. If in your version XAMPP Apache below version 2.4 , then for virtual hosts to work correctly you need to use the code:

    NameVirtualHost * :80< virtualhost * :80 >DocumentRoot "C:\server\htdocs" ServerName localhost < virtualhost * :80 >ServerAdmin webmaster@ blog.ru DocumentRoot "C:\mysites\blog.ru\www" ServerName blog.ru ServerAlias ​​www.blog.ru ErrorLog "C:\mysites\blog.ru\logs\error.log" CustomLog "C:\mysites\blog.ru\logs\access.log" combined< directory "C:\mysites\blog.ru\www" >AllowOverride All Order allow,deny Allow from all

    NameVirtualHost *:80 DocumentRoot "C:\server\htdocs" ServerName localhost ServerAdmin [email protected] DocumentRoot "C:\mysites\blog.ru\www" ServerName blog.ru ServerAlias ​​www.blog.ru ErrorLog "C:\mysites\blog.ru\logs\error.log" CustomLog "C:\mysites\blog.ru \logs\access.log" combined AllowOverride All Order allow,deny Allow from all

    Be careful here, otherwise you will spend half a day like me to understand where the error suddenly came from" AH01630: client denied by server configuration"and why are virtual hosts on old version XAMPP work, but new server It keeps giving me a configuration error.

    After this setup you need to open the file hosts along the way" C:\Windows\System32\drivers\ets\hosts" and add the text there:

    127. 0. 0. 1 blog. ru 127. 0. 0. 1 www. blog. ru

    127.0.0.1 blog.ru 127.0.0.1 www.blog.ru

    Now restart Apache(button " Stop"and then again" Start" in the server control panel) and you can open your site via URL http://www.blog.ru. Nothing complicated, 5 minutes of work maximum.

    The advantages of using virtual hosts are obvious - to transfer a blog to a hoster, you just need to copy the engine files and import a pre-made one via phpMySQL database dump. Well, perhaps you still have to change the passwords in the file wp-config.php for those that the hoster will give you. There are also disadvantages when using virtual hosts - after transferring the site to the hoster, you will no longer be able to simultaneously work with both the local version of the blog and the public one. To open the local version you will have to add the necessary lines to the file hosts, and to open a blog with the hoster you will have to delete these lines. Some have a shortcut to the file hosts placed directly on the desktop, since editing it becomes a fairly common task. Either way, virtual hosts are convenient.

    At the beginning of the article I said that installation different versions XAMPP is the same. But in fact, in older versions of the server, the windows may look different, and some may be skipped altogether. But essentially, everything is the same. And it is configured in exactly the same way. If you have any problems, write about them in the comments - I will definitely help you.

    And lastly, after installation and configuration WordPress Don't forget to install the required set of plugins for it. At a minimum, install a plugin for (Russian links are a bad idea!), a plugin for

    First, let's look at what the XAMPP web server is and compare the versions for Windows.

    XAMPP - cross-platform web server build containing Apache, MySQL, interpreter PHP scripts, the Perl programming language and a large number of additional libraries that allow you to run a full-fledged web server.

    At the time of writing, two versions of XAMPP for Windows are available for download on the site: XAMPP Windows 1.7.2 and XAMPP Lite 1.7.2.

    Web server version XAMPP Windows 1.7.2 XAMPP Lite 1.7.2
    Libraries Apache 2.2.12 (IPV6 enabled) Apache 2.2.12 (IPV6 enabled)
    MySQL 5.1.37 (Community Server) with PBXT engine 1.0.08-rc
    PHP 5.3.0 + PEAR (PEAR, Mail_Mime, MDB2, Zend) PHP 5.3.0 + PEAR
    Perl 5.10.0 (Bundle::Apache2, Bundle::Apache::ASP, Bundle::Email, Bundle::DBD::mysql, DBD::SQlite) Mini Perl 5.10.0
    XAMPP Control Version 2.5.8 (ApacheFriends Edition)
    XAMPP CLI Bundle 1.6 XAMPP CLI Bundle 1.6
    XAMPP Port Check 1.4 XAMPP Port Check 1.4
    XAMPP Security 1.1 XAMPP Security 1.1
    SQLite 2.8.17 SQLite 2.8.17
    SQLite 3.6.16 SQLite 3.6.16
    OpenSSL 0.9.8k OpenSSL 0.9.8k
    phpMyAdmin 3.2.0.1 phpMyAdmin 3.2.0.1
    ADOdb v5.09a -
    FPDF v1.6 -
    Zend Framework 1.9 Minimal Package (via PEAR) -
    Mercury Mail Transport System v4.62 -
    msmtp 1.4.17 (a sendmail compatible SMTP client)
    FileZilla FTP Server 0.9.32 -
    Webalizer 2.21-02 (with GeoIP lite)
    Xdebug 2.0.5 for PHP -
    eAccelerator 0.9.6-rc1 for PHP -
    Ming 0.4.2 for PHP Ming 0.4.2 for PHP
    PDF with pdflib lite v7.0.4p4 for PHP
    System requirements 128 MB RAM 128 MB RAM
    256 MB free fixed disk 160 MB free fixed disk
    Windows 2000, XP (Server 2003), Vista (Server 2008)
    all systems 32 bit (64 bit not tested)
    Size EXE 44MB ZIP 84MB EXE 26MB ZIP 56MB
    Download page http://www.apachefriends.org/en/xampp-windows.html#641 http://www.apachefriends.org/en/xampp-windows.html#646

    The question of choosing a version lies only in the availability of the necessary libraries (see table above), the light version, according to the authors, is not updated as often as the full package, the installation process for both versions is absolutely identical. We go to the site using the links indicated above and download the version that suits you (in the review I will talk about installing and configuring XAMPP Windows 1.7.2, the installation was carried out on Windows 7 Ultimate x86).

    Installing XAMPP Web Server

    1. Start installing XAMPP. A window will open in which we are asked to select the path to locate the server. By default this is the C:\ drive. I will not change the path and will install the server on the suggested disk. Click the Install button and wait until the distribution package is completely unpacked.


    2. After unpacking the distribution, the command line will start, then the main installation will take place through it. XAMPP suggests creating shortcuts on the desktop and in the start menu, press enter.


    3. Now we are asked whether the XAMPP installation directory is selected correctly, by default the server will be located at the following address C:\xampp, press enter.


    4. Do we want to install the portable version? Press enter, because XAMPP is installed on your hard drive.


    5. Final installation of XAMPP. Press enter to continue.


    6. Automatic time zone selection. Press enter.


    7. Launch the XAMPP Control Panel, select 1 and press enter.


    8. The server control panel opened. Close the command line.

    Control panel tips:

    Checkboxes (Svc)- installs the module as a Windows service (if you want to run any module (Apache, MySQL, etc.) as a service, then check the appropriate boxes)

    Admin- starts administration of the module (Admin opposite the Apache module - opens the XAMPP welcome window, select the language. And we get to the XAMPP web interface, here you can check demo examples in the Demos section, find out information about the modules, etc. Admin opposite the MySQL module - launches phpMyAdmin)

    Shell- launch the command line to work with the server;

    Setup- opens a command line to configure XAMPP;

    Port-Check- port checking;

    Explore- opens the folder where XAMPP is installed, in our case C:\xampp;

    SCM- opens the Windows service management window;

    Refresh- updating the status of modules;

    XAMPP is launched using a shortcut on the desktop or in the start menu, but if you refused to create shortcuts during installation, you can launch XAMPP using the xampp-control.exe file in the C:\xampp directory, where you can see all the other shortcuts , which can be used to launch individual modules, uninstall XAMPP, etc.

    The XAMPP icon sits comfortably in the tray and when left clicked, it opens the XAMPP Control Panel.

    9. Launch the Apache and MySQL modules (Start buttons), type localhost in the browser (or click Admin next to the Apache module):

    10. POn first launch, the welcome page will open, select one of the proposed languages:


    11. We get to the XAMPP web interface, here you can read the documentation, examples in the Demos section, etc.:


    The Security section contains security settings:



    So, we have installed and become familiar with the XAMPP web server, now it is time to create a test page and host our project.

    In order to create a new site on a local web server, you need to create a folder with the name of the site in the C:\xampp\htdocs\ folder, for example blog and create a test php script there with the code:

    Let's save it as index.php. Folder structure:

    We go to the address http://localhost/blog/ in the browser and, if everything is done correctly, we see the greeting “Hello world!”, thereby we have tested the performance of the server:


    The web server can be installed in another way, for this you need to unpack the installer or ZIP archive to any location convenient for you on your hard drive, the name of the xampp folder can be renamed, for example, to server and start the installation using the setup_xampp.bat file in this folder, repeat all steps described above.

    If you are installing XAMPP for the first time, I recommend that you do not change the folder names for the first time and install the web server by default, so that later you do not look for errors that may arise when specifying incorrect paths for virtual hosts, which will be discussed below.

    Setting up virtual hosts

    If we want to store our projects in another folder (for example, My Documents) or the local version of the site should work when going to www.blog.ru, you need to figure out how to configure virtual hosts, this will be discussed in this subsection.

    Suppose our site should be stored on drive C in the folder my_projects (C:\my_projects), in the browser it should open at the address www.blog.local or blog.local.

    Let's create a folder called blog.local in the my_projects folder, and create the www and logs folders in it. Let's put our test script index.php in the www folder.

    This is what it will look like in file system Windows:

    Now let's move on to setting up virtual hosts. Open the httpd-vhosts.conf file in a text editor, located at the following address: C:\xampp\apache\conf\extra.

    We will not touch everything that is in the httpd-vhosts.conf file, but will simply add our hosts (just copy and paste the code below into the file):

    NameVirtualHost *:80 ServerAdmin

    The top virtual host, highlighted in a different color, will allow us to still access localhost (the local XAMPP site).

    The next step we need to add two lines to hosts file, located at the following address C:\Windows\System32\drivers\etc\hosts (I also recommend creating a shortcut for it in the server folder):

    127.0.0.1 blog.local 127.0.0.1 www.blog.local

    Go to the XAMPP Control Panel and restart Apache. Now let's check our site, which should work at www.blog.local. If everything is done correctly, we will see the greeting "Hello world!"

    Since you will most likely need to create several sites on a local server, I will give an example of adding hosts to the httpd-vhosts.conf file. Let's assume the new site will be called site.local:

    NameVirtualHost *:80 DocumentRoot "C:\xampp\htdocs" ServerName localhost ServerAdmin DocumentRoot "C:\my_projects\blog.local\www" ServerName blog.local ServerAlias ​​www.blog.local ErrorLog "C:\my_projects\blog.local\logs\error.log" CustomLog "C:\my_projects\blog. local\logs\access.log" combined AllowOverride All Order allow,deny Allow from all ServerAdmin DocumentRoot "C:\my_projects\site.local\www" ServerName site.local ServerAlias ​​www.site.local ErrorLog "C:\my_projects\site.local\logs\error.log" CustomLog "C:\my_projects\site. local\logs\access.log" combined AllowOverride All Order allow,deny Allow from all

    Also, don’t forget to add the following lines to the hosts file in the Windows folder:

    127.0.0.1 site.local 127.0.0.1 www.site.local

    We restart Apache and the new host is ready to work.

    By analogy, you can add as many virtual hosts as you like.

    Some background information regarding what we are adding to the httpd-vhosts.conf file:

    Installing WordPress on XAMPP

    To install WordPress, we will use the previously created blog.local virtual host, therefore the engine files will be located in the blog.local folder (C:\my_projects\blog.local\www).

    1. Download the latest version of WordPress from the official website www.wordpress.org and unpack the archive into the www folder (the contents of the wordpress folder in the archive).

    2. Let's go to phpMyAdmin and create a database for our blog:


    New database: blog; comparison: utf8_general_ci; mapping the connection to MySQL: utf8_general_ci → click the Create button.

    So, the database is created:


    3. Let's return to the folder where we unpacked WordPress and find the wp-config-sample.php file, rename it to wp-config.php and open it in any text editor that supports UTF-8 encoding and enter your data:

    - Database name for WordPress: blog;

    - MySQL username: root;

    - MySQL user password: leave empty if in Security settings did not indicate anything;

    - MySQL server address: localhost;

    - Database encoding when creating tables: utf8;

    - Mapping scheme: utf8_general_ci;

    It should look like this:

    /** Database name for WordPress */ define("DB_NAME", "blog"); /** MySQL username */ define("DB_USER", "root"); /** MySQL user password */ define("DB_PASSWORD", ""); /** MySQL server address */ define("DB_HOST", "localhost"); /** Database encoding when creating tables. */ define("DB_CHARSET", "utf8"); /** Matching scheme. Don't change if you're not sure. */ define("DB_COLLATE", "utf8_general_ci");

    Save and close the file.

    It is important that all changes in the wp-config.php file are saved in UTF-8 encoding!

    4. Go to the address in the browserblog.local and see the WordPress welcome page, enter the name of the blog and the administrator’s e-mail (we can look at all letters in the sendmail folder, which was discussed above):


    Click “Install WordPress” and you will be taken to a page with your username and password:


    Login to the blog administration panel:http://blog.local/wp-admin/


    Go to blog: http://blog.local


    You can install WordPress by alternative way, to do this, after unpacking the archive with the engine and creating the database, type in address bar browser name of your blog, WordPress will prompt you to create a wp-config.php file through the web interface.

    In conclusion, I want to say that I really liked how XAMPP works, it works quickly, there are no errors, I consider the fact that some add-ons need to be done manually to be only a plus.