{"id":150594,"date":"2022-01-15T11:00:00","date_gmt":"2022-01-15T11:00:00","guid":{"rendered":"http:\/\/premium.wpmudev.org\/blog\/?p=150594"},"modified":"2022-03-02T04:24:09","modified_gmt":"2022-03-02T04:24:09","slug":"setting-up-xampp","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/setting-up-xampp\/","title":{"rendered":"How to Install XAMPP and WordPress on Windows Localhost"},"content":{"rendered":"<p>Once you\u2019ve experienced speed and reliability, there\u2019s no going back. Remember the era before high-speed internet, when you had to wait for videos to buffer? Awful times. Three cheers for the modern internet speeds!<\/p>\n<p>If you\u2019re used to developing your sites on a live server, that\u2019s exactly what shifting to a local development environment such as XAMPP would feel like. Blazing fast development and exceptional reliability. You can never go back to the old ways.<\/p>\n<p>In this post, I\u2019ll be showing you how to install XAMPP on your Windows PC and have a WordPress site (including Multisite) running on it in just a few minutes. I\u2019ll also cover some common issues that you may encounter and how to overcome them.<\/p>\n<p>Continue reading, or jump ahead using these links:<\/p>\n<ul>\n<li><a href=\"#what-is-xampp\">What is XAMPP?<\/a><\/li>\n<li><a href=\"#why-xampp\">Why XAMPP?<\/a><\/li>\n<li><a href=\"#why-use-xampp-to-create-local-wordpress-sites\">Why Use Xampp to Create Local WordPress Sites?<\/a><\/li>\n<li><a href=\"#steps-to-install-xampp-on-windows\">Steps to Install XAMPP on Windows<\/a><\/li>\n<li><a href=\"#testing-your-xampp-installation\">Testing Your XAMPP Installation<\/a><\/li>\n<li><a href=\"#installing-wordpress-locally-with-xampp\">Installing WordPress Locally with XAMPP<\/a><\/li>\n<li><a href=\"#setting-up-wordpress-multisite-locally-with-xampp\">Setting Up WordPress Multisite Locally with XAMPP<\/a><\/li>\n<li><a href=\"#troubleshooting-common-issues-with-xampp-and-wordpress\">Troubleshooting Common Issues with XAMPP &amp; WordPress<\/a><\/li>\n<\/ul>\n<p>If you prefer a video instead, we&#8217;ve got you covered!<\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><span class=\"embed-youtube-lazy-id dev-hidden\">A4r-Q5YnMLE<\/span><\/span><\/p>\n<h2 id=\"what-is-xampp\">What is XAMPP?<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/XAMPP_Intro.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"73\" \/><\/p>\n<p>In a nutshell, <a href=\"https:\/\/www.apachefriends.org\/index.html\" rel=\"noopener\" target=\"_blank\">XAMPP<\/a> is a local server that you can install on your laptop\/desktop to mimic an actual web server.<\/p>\n<p>It\u2019s a completely free, open source Apache server distribution with MariaDB (formerly MySQL), PHP, and Perl. XAMPP is available for all major operating systems, and is extremely easy to install and use. This explains why it\u2019s the most popular PHP development environment.<\/p>\n<p>Here\u2019s what the alphabets in XAMPP stand for:<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><strong>X<\/strong> \u2014 cross-platform (X), as it supports multiple operating systems<\/li>\n<li style=\"font-weight: 400;\"><strong>A<\/strong> \u2014 Apache HTTP Server<\/li>\n<li style=\"font-weight: 400;\"><strong>M<\/strong> \u2014 MariaDB (formerly MySQL)<\/li>\n<li style=\"font-weight: 400;\"><strong>P<\/strong> \u2014 PHP<\/li>\n<li style=\"font-weight: 400;\"><strong>P<\/strong> \u2014 PERL<\/li>\n<\/ul>\n<p>Apart from the core components mentioned above, XAMPP usually comes with other useful tools such as <strong>Mercury<\/strong> mail server, <strong>phpMyAdmin<\/strong> for database administration, <strong>Webalizer<\/strong> for web server log analysis, <strong>OpenSSL<\/strong>, <strong>Apache Tomcat<\/strong> for running Java code, and <strong>FileZilla<\/strong> FTP server.<\/p>\n<h2 id=\"why-xampp\">Why XAMPP?<\/h2>\n<p>As a professional WordPress developer, I cannot stress enough how beneficial having a local development environment is. It lets me setup new WordPress installs in a jiffy. And since it\u2019s hosted locally on my computer, there\u2019s no delay in uploading my changes and see them come alive on the browser.<\/p>\n<p>Want to try a new theme? Just copy and paste it into your <code>wp-content\/themes<\/code> directory. And bam! It\u2019s loaded instantly. The same with plugins and changing any settings. No server delay, no upload hassles, no unnecessary waiting times. Everything happens in real time.<\/p>\n<p>It\u2019s like taking your car on a racetrack and pushing it to its limits. The perfect testing environment to go wild without any repercussions (well, almost).<\/p>\n<p>With XAMPP installed on my PC, I can continue working on my site even if I\u2019m at a remote location with no connectivity. Developing locally is also much secure, as your site is offline and away from the prying eyes of hackers (and pesky clients).<\/p>\n<h2 id=\"why-use-xampp-to-create-local-wordpress-sites\">Why Use Xampp to Create Local WordPress Sites?<\/h2>\n<p>Like all software, WordPress has certain prerequisites to run. The current <a href=\"https:\/\/wordpress.org\/about\/requirements\/\" rel=\"noopener\" target=\"_blank\">recommended WordPress requirements<\/a> are:<\/p>\n<ul>\n<li style=\"font-weight: 400;\">PHP version 7.4 or greater<\/li>\n<li style=\"font-weight: 400;\">MySQL version 5.7 or greater OR MariaDB version 10.2 or greater<\/li>\n<li style=\"font-weight: 400;\">HTTPS support<\/li>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/httpd.apache.org\/\" target=\"_blank\">Apache<\/a> OR <a href=\"https:\/\/nginx.org\/\" target=\"_blank\">Nginx<\/a> server<\/li>\n<\/ul>\n<p>XAMPP checks all the boxes listed above. It\u2019s free, reliable, easy to use, and works on all major platforms. You can\u2019t go wrong with it.<\/p>\n<h2 id=\"steps-to-install-xampp-on-windows\">Steps to Install XAMPP on Windows<\/h2>\n<ol>\n<li><a href=\"#Step1\">Download XAMPP<\/a><\/li>\n<li><a href=\"#Step2\">Install XAMPP\u00a0<\/a><\/li>\n<li><a href=\"#Step3\">Open the XAMPP Control Panel<\/a><\/li>\n<li><a href=\"#Step3\">Start Apache and MySQL Modules<\/a><\/li>\n<\/ol>\n<h3 id=\"Step1\">Step 1: Download XAMPP<\/h3>\n<p>Start off by <a href=\"https:\/\/www.apachefriends.org\/download.html\" rel=\"noopener\" target=\"_blank\">downloading the latest version of XAMPP<\/a> from Apache Friends website. The current up-to-date version of XAMPP is 8.1.2 \/ PHP 8.1.2.<\/p>\n<figure id=\"attachment_206221\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-ratio-full wp-image-206221\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2022\/01\/xampp-php-current-file-versions-1050x712.png\" alt=\"XAMPP PHP most recent file versions\" width=\"1050\" height=\"712\" \/><figcaption class=\"wp-caption-text\">XAMPP &amp; PHP most recent file versions.<\/figcaption><\/figure>\n<p>Note: If you\u2019re using Linux or OSX, the installation steps are pretty much the same. Just make sure to download the appropriate version of XAMPP for your OS.<\/p>\n<h3 id=\"Step2\">Step 2: Install XAMPP<\/h3>\n<p>Once downloaded, run the XAMPP installer file.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Setup_XAMPP_Windows.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><figcaption class=\"wp-caption-text\">The XAMPP Setup Wizard<\/figcaption><\/figure>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/XAMPP_UAC_Warning.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"294\" \/><figcaption class=\"wp-caption-text\">You might get a UAC warning before installation. Click OK and continue.<\/figcaption><\/figure>\n<p>Select the components you want to install. If you\u2019re planning to install a WordPress site with XAMPP, you only need <em>Apache<\/em>, <em>MySQL<\/em>, <em>PHP<\/em>, and <em>phpMyAdmin<\/em>. I&#8217;ll check all the components as I&#8217;d like to experiment with them later.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Select_XAMPP_Components_to_Install.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<p>Choose the installation directory for XAMPP (default recommended).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/XAMPP_Installation_Directory.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<p>Uncheck <em>Learn more about Bitnami<\/em> option. Bitnami provides all-in-one tools to install popular open source apps on top of XAMPP. This includes add-on modules for installing WordPress too. However, we\u2019ll be installing it manually here.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/XAMPP_Apache_Windows_Security_Alert_Defender_Firewall.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<p>You may be presented with a <em>Windows Security Alert<\/em> at the end of the installation. You need to whitelist <em>Apache HTTP Server<\/em> from your <em>Windows Defender Firewall<\/em> by clicking the <em>Allow access<\/em> button. Make sure to check the &#8220;<em>Private networks, such as my home or work network&#8221;<\/em> option. This is very important. XAMPP won\u2019t work if you don\u2019t check this and click <em>Allow access.<\/em><\/p>\n<p>Complete the setup and run <em>XAMPP Control Panel<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Complete_XAMPP_Setup_Run_Control_Panel.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<h4>Installation Note 1: Deactivate UAC under Windows Settings<\/h4>\n<p>You might be presented with a <em>User Access Control (UAC)<\/em> warning by Windows. Nothing to worry much. Just make sure that you don\u2019t install XAMPP under your <code>Program Files<\/code> directory, as <em>UAC<\/em> can interfere with XAMPP&#8217;s writing permissions to this directory. The default installation directory is <code>C:\\XAMPP<\/code>. So, if you don\u2019t change it, you should be good.<\/p>\n<p>If you want to learn <a href=\"https:\/\/support.microsoft.com\/en-us\/help\/17228\/windows-protect-my-pc-from-viruses#\" rel=\"noopener\" target=\"_blank\">how to deactivate UAC<\/a> (not recommended unless absolutely necessary), Microsoft Windows support is a good place to start.<\/p>\n<h4>Installation Note 2: Deactivate Antivirus and\/or Firewall Temporarily<\/h4>\n<p>Some antivirus or firewall programs can cause issues with your XAMPP installation. If that\u2019s the case, it\u2019s suggested that you deactivate them temporarily until XAMPP is installed successfully.<\/p>\n<p>Read the <a href=\"https:\/\/www.apachefriends.org\/faq_windows.html\" rel=\"noopener\" target=\"_blank\">XAMPP Windows FAQs<\/a> page for more.<\/p>\n<h3 id=\"Step3\">Step 3: Open the XAMPP Control Panel<\/h3>\n<p>The XAMPP Control Panel sports a simple user interface that lists all the modules of your local server. It allows you to <em>Start\/Stop<\/em> individual modules, access their <em>Admin<\/em> area, <em>Config<\/em> files, and <em>Logs<\/em> with just a single click. Its bottom section also displays all your actions and errors (if any).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/The_XAMPP_Control_Panel.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<p>Apart from the options discussed above, the XAMPP Control Panel also features other buttons on its right side:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\"><strong>Config:<\/strong> to configure overall XAMPP settings<\/li>\n<li style=\"font-weight: 400;\"><strong>Netstat:<\/strong> display all active TCP connections (and ports) on your computer<\/li>\n<li style=\"font-weight: 400;\"><strong>Shell:<\/strong> starts XAMPP in a custom command line (CMD)<\/li>\n<li style=\"font-weight: 400;\"><strong>Explorer:<\/strong> opens the XAMPP root folder in Windows Explorer<\/li>\n<li style=\"font-weight: 400;\"><strong>Services:<\/strong> shows all Windows services under Microsoft Management Console<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400;\"><strong>Help:<\/strong> links to Apache Friends Support Forum<\/li>\n<li style=\"font-weight: 400;\"><strong>Quit:<\/strong> quit XAMPP Control Panel (the server will continue to run in the background)<\/li>\n<\/ul>\n<h3 id=\"step4\">Step 4: Start Apache and MySQL Modules<\/h3>\n<p>Click the <em>Start<\/em> button beside Apache module. If everything\u2019s set correctly, your Apache server should start successfully under ports 83 and 443.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Start_Apache_Server_XAMPP.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<p>You can access your Apache server\u2019s dashboard by clicking the <em>Admin<\/em> button beside it. Alternatively, you can also reach it via <a href=\"http:\/\/localhost\/dashboard\/\" target=\"_blank\"><em>http:\/\/localhost\/dashboard\/<\/em><\/a><em> URL<\/em> in your browser.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/XAMPP_Apache_Dashboard.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"360\" \/><\/p>\n<p>Then <em>Start<\/em> the MySQL module. If you\u2019re presented with a Windows Security Alert to whitelist<em> mysqld.exe<\/em>, click <em>Allow access<\/em>. Like before, make sure that you\u2019ve ticked the &#8220;<em>Private networks,&#8230;<\/em>&#8221; option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Start_MySQL_Server_XAMPP.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"338\" \/><\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/MySQLd_EXE_Firewall_Allow_Access.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"402\" \/><figcaption class=\"wp-caption-text\">Don&#8217;t forget to tick the &#8220;Private networks&#8221; option.<\/figcaption><\/figure>\n<p>You can access your phpMyAdmin dashboard by clicking the <em>Admin <\/em>button beside MySQL module. Or you can simply go to <a href=\"http:\/\/localhost\/phpmyadmin\/\" target=\"_blank\"><em>http:\/\/localhost\/phpmyadmin\/<\/em><\/a> in your browser. Here, you can manage the MariaDB (or MySQL) databases of your web projects.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Access_phyMyAdmin_MySQL_Dashboard.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"352\" \/><\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/phpMyAdmin_Dashboard.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"352\" \/><figcaption class=\"wp-caption-text\">The phpMyAdmin Dashboard<\/figcaption><\/figure>\n<p>This concludes the setup of XAMPP as your local development environment. It\u2019s now ready to host any PHP-based software (e.g. WordPress).<\/p>\n<h2 id=\"testing-your-xampp-installation\">Testing Your XAMPP Installation<\/h2>\n<p>The best way to check whether your local server has been installed and configured correctly is to create a <em>PHP test page<\/em>, place it in XAMPP\u2019s localhost folder, and then try accessing it via your browser.<\/p>\n<p>Let\u2019s do that now. Create a new folder called <em>test <\/em>in your <code>C:\\xampp\\htdocs\\<\/code> directory. This directory can also be accessed easily by clicking the <em>Explorer <\/em>button in XAMPP Control Panel and then going to\u00a0<em>htdocs <\/em>folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Test_Folder_htdocs_XAMPP.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"200\" \/><\/p>\n<p>Create a file called <em>test.php<\/em> with the code below and place it in <code>C:\\xampp\\htdocs\\test<\/code> folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Test_PHP_Test_Folder_htdocs_XAMPP.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"104\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Test_PHP_File_Code.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"168\" \/><\/p>\n<div class=\"gist\" data-gist=\"b31ff1b76ccdd0300c75f08a3d694959\" data-gist-file=\"test.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/b31ff1b76ccdd0300c75f08a3d694959.js?file=test.php\">Loading gist b31ff1b76ccdd0300c75f08a3d694959<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Try visiting <a href=\"http:\/\/localhost\/test\/test.php\" target=\"_blank\"><em>http:\/\/localhost\/test\/test.php<\/em><\/a> in your browser. If it displays the words \u201c<em>Hello World! Welcome to WPMU DEV<\/em>\u201d, then XAMPP is successfully installed and configured on your system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/PHP-test-Hello-World.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"125\" \/><\/p>\n<h2 id=\"installing-wordpress-locally-with-xampp\">Installing WordPress Locally with XAMPP<\/h2>\n<h3>Step 1: Create a New MySQL Database for Your WordPress Installation<\/h3>\n<p>Before we install WordPress, we need a database.<\/p>\n<p>In your XAMPP Control Panel, click the <em>Admin<\/em> button in the MySQL section. A new browser window will automatically open with the phpMyAdmin dashboard interface. Click on <em>Databases<\/em> near the top-left.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Database_Creation_phpMyAdmin.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"242\" \/><\/p>\n<p>You\u2019ll now be prompted to create a new database. I\u2019ve named mine <em>wpmudev<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/phpMyAdmin_Create_Database.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"242\" \/><\/p>\n<p>Once you\u2019ve entered a name, click <em>Create<\/em> and close the window.<\/p>\n<h3>Step 2: Download and Install WordPress<\/h3>\n<p><a href=\"https:\/\/wordpress.org\/download\/\" rel=\"noopener\" target=\"_blank\"><em>Download<\/em> the latest version of WordPress<\/a>.<\/p>\n<figure id=\"attachment_206222\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-ratio-full wp-image-206222\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2022\/01\/wp-download-current-version-1050x340.png\" alt=\"WordPress download\" width=\"1050\" height=\"340\" \/><figcaption class=\"wp-caption-text\">WordPress download.<\/figcaption><\/figure>\n<p><em>Unzip<\/em> WordPress in the right folder under XAMPP. In my case, it\u2019s <code>C:\/xampp\/htdocs<\/code>. Rename it to whatever you like, but it\u2019s recommended to give this folder the name of your site. I\u2019m going to call this installation of WordPress <em>wptest<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/wptest_WordPress_folder_Location.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"203\" \/><\/p>\n<p>Now, go into your site\u2019s WP folder, find the <em>wp-config-sample.php<\/em> file, and rename it <em>wp-config.php<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Rename_wp-config-sample_PHP_File.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"329\" \/><\/p>\n<p>Open the file and scroll down until you see the following lines:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/wp-config-php_Setup_Database_Connection.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"307\" \/><\/p>\n<p>These lines of code define the login details for your database. Update them as per the instructions below:<\/p>\n<ul>\n<li style=\"font-weight: 400;\">Replace \u201cdatabase_name_here\u201d with the name of your database, which in my case is <em>wpmudev<\/em>.<\/li>\n<li style=\"font-weight: 400;\">Replace \u201cusername_here\u201d with \u201croot\u201d and edit \u201cpassword_here\u201d field to be empty.<\/li>\n<li style=\"font-weight: 400;\">Save the file and close it<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/wp-config-php_Setup_Database_Connection_Edited.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"307\" \/><\/p>\n<p>We can continue with our WordPress installation now. Open your browser and go to <a href=\"http:\/\/localhost\/wptest\/\" target=\"_blank\"><em>http:\/\/localhost\/wptest\/<\/em><\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Browser_Local_WordPress_Installation_Folder.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"307\" \/><\/p>\n<p>You should see the WordPress installation\u2019s language selection screen load.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/WordPress_Installation_File_Language_Selection_Screen.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"261\" \/><\/p>\n<p>Once you\u2019ve chosen your language, continue onto the next screen. Enter your site title, admin username, and password details.\u00a0Click <em>Install WordPress<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Famous_5_Minute_WordPress_Installation.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"595\" height=\"600\" \/><\/p>\n<p>Congrats, you\u2019ve successfully installed WordPress on your local server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Fresh_WordPress_Installation_Dashboard.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"309\" \/><\/p>\n<h2 id=\"setting-up-wordpress-multisite-locally-with-xampp\">Setting Up WordPress Multisite Locally with XAMPP<\/h2>\n<h3>Step 1: Enable WP Multisite in your <em>wp-config.php<\/em> File<\/h3>\n<p>Open your <em>wp-config.php<\/em> file and add the following line just above the line that says <em>\/* That&#8217;s all, stop editing! Happy publishing. *\/<\/em>.<\/p>\n<p><code>define('WP_ALLOW_MULTISITE', true)<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Enable_WP_Multisite_Installation.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"141\" \/><\/p>\n<p>This will activate the Multisite installation mode on your WordPress site.<\/p>\n<h3>Step 2: Setup Your Multisite Network<\/h3>\n<p>Go to your WordPress dashboard, and then to <em>Tools &gt; Network Setup<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/WordPress_Tools_Network_Setup.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"299\" \/><\/p>\n<p>Enter a name for your multisite network and your network admin email address. Then click <em>Install<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Creating_WordPress_Network_Sites.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"381\" \/><\/p>\n<p>WordPress will now prompt you to edit your <em>wp-config.php<\/em> and <em>.htaccess<\/em> files.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Network_Site_Add_Code_wp-config-php.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"216\" \/><figcaption class=\"wp-caption-text\">Follow the instructions given.<\/figcaption><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Network_Site_Replace_Code_htaccess.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"216\" \/><\/p>\n<h3>Step 3: Follow WordPress\u2019 Onscreen Instructions<\/h3>\n<p>Open your <em>wp-config.php<\/em> again and add the code given by WordPress underneath your previous edit.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Network_Site_Add_Code_wp-config-php_Code.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"288\" \/><\/p>\n<p>Next, open <em>.htaccess <\/em>file and replace all its code with the one given by WordPress (Note: you\u2019ll have to replace the contents completely here, not just add\/edit).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Create_Network_Site_Replace_Code_htaccess_Code.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"254\" \/><\/p>\n<p>If you can\u2019t find the <em>.htaccess<\/em> file, make sure to enable <em>display hidden files<\/em> settings on your computer. If you still can\u2019t find it, then create one in the same directory as your <em>wp-config.php<\/em> file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/htaccess_file_location.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"296\" \/><\/p>\n<p>Multisite should now be successfully activated on your WordPress installation.<\/p>\n<p>You\u2019ll have to log in again. And when you do, you\u2019ll be able to access individual sites in your multisite network from your dashboard.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Multisite_Network_Individual_My_Sites.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"294\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Multisite_Network_Individual_Sites-Panel.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"216\" \/><\/p>\n<p>You can also create a new network site from here by clicking the <em>Add New<\/em> button.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2019\/03\/Creating_a_Network_Site_Plugins.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"370\" \/><figcaption class=\"wp-caption-text\">Adding a New Network Site<\/figcaption><\/figure>\n<h2 id=\"troubleshooting-common-issues-with-xampp-and-wordpress\">Troubleshooting Common Issues with XAMPP &amp; WordPress<\/h2>\n<p>While my XAMPP and WordPress installation went without a hitch, not everyone is so lucky. XAMPP can throw a curveball at you at any stage of its and WordPress&#8217; installation. Here are some common issues associated with XAMPP (click to go to its solution):<\/p>\n<ul>\n<li><a href=\"https:\/\/windowsreport.com\/cant-install-xampp-software-pc\/\" rel=\"noopener\" target=\"_blank\">Can&#8217;t Install XAMPP on Windows<\/a><\/li>\n<li><a href=\"https:\/\/wpmudev.com\/blog\/troubleshooting-xampp\/\" target=\"_blank\">Apache Will Not Start Without the Configured Ports<\/a><\/li>\n<li>Unable to Add or Import Additional Menu Items (same link as above)<\/li>\n<li>Maximum PHP Execution Time Exceeded (same link as above)<\/li>\n<li>Maximum File Size Exceeded (same link as above)<\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/19942229\/xampp-object-not-found-error\" rel=\"noopener\" target=\"_blank\">Object not found! Error<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/a\/27588802\" rel=\"noopener\" target=\"_blank\">Error: Apache Shutdown Unexpectedly<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/29822686\/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate\/34883260#34883260\" rel=\"noopener\" target=\"_blank\">cURL Error 60: SSL Certificate Problem<\/a><\/li>\n<\/ul>\n<h2>XAMPPing Up<\/h2>\n<p>XAMPP allows you to set up a local server environment on your Windows machine easily. The best thing about it is that it\u2019s completely free and open source. Once installed, you&#8217;ll forget that it&#8217;s even there.\u00a0You can even <a href=\"https:\/\/wpmudev.com\/blog\/install-wordpress-usb\/\" target=\"_blank\" rel=\"noopener\">install XAMPP on a USB drive along with WordPress<\/a>.<\/p>\n<p>With XAMPP, you can develop and test WordPress sites swiftly on your system, rather than doing it the hard way on a live site. You can try different themes and plugins, test their various features, and experiment with many other aspects of your site without breaking a sweat.<\/p>\n<p>What\u2019s more, you can also install as many instances of WordPress as you like (including Multisite). Who knew the saying &#8220;<em>think global, act local<\/em>&#8221; holds true for web development too!<\/p>\n<figure id=\"attachment_129996\" class=\"wp-caption aligncenter\"><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Setting up XAMPP on your Windows machine is by far no easy feat, but once installed it&#8217;s a breeze to run and will save you a bunch of time if you need to run WordPress locally to test themes and plugins. In fact, you&#8217;ll forget it&#8217;s even there.<\/p>\n","protected":false},"author":761786,"featured_media":199989,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[557,263],"tags":[9974,11027,10102,10389,11026,11025,10388],"tutorials_categories":[],"class_list":["post-150594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-tutorials","tag-wordpress","tag-install","tag-local","tag-localholst","tag-pc","tag-windows","tag-xampp"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/150594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/761786"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=150594"}],"version-history":[{"count":52,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/150594\/revisions"}],"predecessor-version":[{"id":206219,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/150594\/revisions\/206219"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/199989"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=150594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=150594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=150594"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=150594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}