{"id":152,"date":"2017-12-03T09:58:12","date_gmt":"2017-12-03T09:58:12","guid":{"rendered":"http:\/\/intechsource.com\/?p=152"},"modified":"2017-12-04T17:46:45","modified_gmt":"2017-12-04T17:46:45","slug":"installing-wordpress-in-windows-by-using-xampp","status":"publish","type":"post","link":"http:\/\/www.texeltech.com\/?p=152","title":{"rendered":"Installing WordPress in Windows by using XAMPP"},"content":{"rendered":"<p>Now I shall show how to install XAMPP on Windows. It not much more hard. It is very easy. Once you have installed your computer will be act like as a web server. You will use it in Intranet. I shall discuss here not more in details of XAMPP. Our focus is installing WordPress. So Lets start.<\/p>\n<p>Having a localhost environment is an essential part of my WordPress workflow \u2013 I couldn\u2019t do my day job without it. I regularly set up new installs of WordPress to test and play with new versions of themes and plugins, and I have multiple Multisite installs set up, too.<\/p>\n<p>Note: If you&#8217;re still having trouble setting up XAMPP, let us help! Our awesome support team can help you with any WordPress issue, big or small \u2013 and for free! It doesn&#8217;t matter what time it is or whether it&#8217;s the weekend, our team is available 24\/7. Check out our Support page to find out more.<\/p>\n<p>The great thing about running a localhost install is that your test site will run much more quickly than it otherwise would online, but if you want to ensure it continues to run at optimal speed, be sure to install and activate Hummingbird on your install.<\/p>\n<p>A localhost install is also more secure and provides an ideal testing environment on your computer, away from prying eyes or hackers.<\/p>\n<p>We originally published a version of this post in mid-2014 and it quickly became one of our top 10 posts with well over 150 comments. Since then, XAMPP 5.6.15 is now available and Windows itself has undergone a few updates. So here\u2019s a shiny new updated guide on how to set up XAMPP on Windows, with added information on how to get around pesky firewall and port issues.<\/p>\n<p>What is XAMPP?<\/p>\n<p>XAMPP stands for cross-platform, Apache, MySQL, PHP and Perl. It\u2019s a simple and lightweight solution that allows you to create a local web server for testing purposes.<\/p>\n<p>Since XAMPP is cross-platform, it also works on Mac and Linux, but today we\u2019re going to focus on how to set up XAMPP on Windows 10.<\/p>\n<p>WordPress isn\u2019t a stand-alone application and requires server software in order to run. XAMPP provides the necessary environment needed to run WordPress on a local machine.<\/p>\n<p>Installing XAMPP<\/p>\n<p>Go to the Apache Friends website and download XAMPP.<\/p>\n<p>The Apache Friends website.<br \/>\nThe Apache Friends website.<br \/>\nThe XAMPP file is 109MB. Once downloaded, launch the installer.<\/p>\n<p>During the install process, you may receive warnings such as Windows asking you if you\u2019re sure you want to install the software and the installer prompting you about antivirus software. As you would when installing any software on Windows, use your best judgment, but you probably want to click \u201cYes\u201d to continue with the install.<\/p>\n<p>The XAMPP setup wizard will guide you through the installation. Click Next.<\/p>\n<p>The XAMPP setup wizard.<\/p>\n<p>In the next window, you will be asked to select which components of the software you would like to install and which ones you don\u2019t want. Some options, such as Apache and PHP are essential to running the software and will at automatically installed, so they are grayed out so you can\u2019t select them.<\/p>\n<p>It\u2019s up to you which components you want to install. Since we want to run WordPress in our localhost environment, leave MySQL and phpMyAdmin checked and uncheck the remaining options.<\/p>\n<p>Choose the options you want to install.<\/p>\n<p>Next, select the folder where you would like to install XAMPP on your machine. I\u2019m going to create a new folder in C:\\Program Files\\XAMPP.<\/p>\n<p>Enter the path where you would like to install XAMPP.<\/p>\n<p>In the next window, you\u2019ll be asked whether you would like to install Bitnami for XAMPP, which offers free tools for installing WordPress, Drupal, and Joomla! on top of XAMPP.<\/p>\n<p>Since we\u2019re going to install WordPress manually later in this tutorial and don\u2019t need free installers, untick \u201cLearn more about Bitnami for XAMPP\u201d and click Next.<\/p>\n<p>We don&#8217;t want to install any free installers.<\/p>\n<p>After going through all those initial installation steps, XAMPP is now finally ready to install. Click Next.<\/p>\n<p>Installing XAMPP.<\/p>\n<p>Once installed, you\u2019ll be asked whether you would like to start the XAMPP Control Panel, which provides an interface for running your localhost environment. Leave this option ticked and click Finish.<\/p>\n<p>The installation process is quick and painless, though it&#8217;s not uncommon for Windows to throw up warnings every now and then.<\/p>\n<p>The Control Panel will automatically open, but if you unchecked the option in the previous window, you can go to the XAMPP folder on your computer and open XAMPP Control Panel instead.<\/p>\n<p>If the installation process went well and everything is running smoothly, the control panel will open with black and blue text updates at the bottom. But if there are issues\u2026<\/p>\n<p>Gah! Errors :\/<\/p>\n<p>\u2026 Well, look at that \u2013 red text! It looks like I\u2019ve run into some errors already. Not to fear, it looks like a port conflict.<\/p>\n<p>Fixing Port Errors<\/p>\n<p>The main reason why XAMPP throws up errors like this is due to another program on your machine using ports 80 or 443 \u2013 the ports Apache and MySQL need in order to run.<\/p>\n<p>If you\u2019re using Windows 10, World Wide Web Publishing Service is most likely using post 80. This program, which is for Internet Information Services (IIS) for Windows\u00ae Server, comes pre-installed and if you\u2019re not using it, you can simply stop the service running on your machine or even delete it.<\/p>\n<p>To stop the service running, do the following:<\/p>\n<p>Go to Start, type in \u201cservices.msc\u201d and select the best match<br \/>\nScroll down in the Services window to find World Wide Web Publishing Service<br \/>\nRight-click on it and select Stop<br \/>\nThis should free up port 80. When you restart XAMPP it should run without errors<br \/>\nIf that doesn\u2019t resolve the issue, you can set up a new firewall rule to forcibly unblock the ports:<\/p>\n<p>Open Windows Firewall on your machine and &gt; click on Advanced Settings on the left<br \/>\nClick on Inbound on the left, then on the far right click New Rule<br \/>\nClick Port and then TCP. In the field below for Specific Ports type in \u201c80, 443\u201d and click Next<br \/>\nCheck Allow the Connection then click Next<br \/>\nMake sure all options are checked and click Next<br \/>\nIn the name field, enter whatever you want, but for the sake of consistency let\u2019s type in LOCALHOST1. Click Finish<br \/>\nNow repeat steps 1-6, but name this new rule LOCALHOST2 and click Finish<br \/>\nRestart your computer<br \/>\nPorts 80 and 443 should now be open locally on your computer.<\/p>\n<p>I should also mention at this stage that if you get any security\/firewall warnings while installing or using XAMPP (such as the prompt pictured below), make sure you check \u201cPrivate networks, such as my home or work network\u201d and click \u201cAllow access.\u201d This is very important. If you don\u2019t allow access, XAMPP won\u2019t work.<\/p>\n<p>You need to allow access so XAMPP can work.<br \/>\nRunning XAMPP<\/p>\n<p>Now, let\u2019s see if everything works smoothly.<\/p>\n<p>If you previously quit the control panel to fix a port issue, restart XAMPP. Then start up both Apache and MySQL.<\/p>\n<p>You have no idea how happy I am to see both Apache and MySQL working, or maybe you do!<br \/>\nYou have no idea how happy I am to see both Apache and MySQL working, or maybe you do!<br \/>\nBoth services are running fine. Excellent!<\/p>\n<p>You can check if your new local server is installed by visiting http:\/\/localhost in your browser.<\/p>\n<p>Woohoo! Successfully set up.<br \/>\nWoohoo! Successfully set up.<br \/>\nSetting Up Your MySQL Database<\/p>\n<p>Before we install WordPress, we need a database.<\/p>\n<p>In your XAMPP Control Panel, click the Admin button in the MySQL section.<\/p>\n<p>XAMPP control panel<br \/>\nClick on Admin in the MySQL row to launch phpMyAdmin.<br \/>\nA new browser window will automatically open with the phpMyAdmin interface.<\/p>\n<p>Click \u201cAdmin\u201d to set up MySQL or go to \u201clocalhost\/phpmyadmin\u201d in your browser.<br \/>\nClick \u201cAdmin\u201d to set up MySQL or go to \u201clocalhost\/phpmyadmin\u201d in your browser.<br \/>\nClick on Databases near the top-left, and you\u2019ll be prompted to create a new database. I\u2019ve called mine \u201cWP.\u201d<\/p>\n<p>When you\u2019ve entered a name, click Create and close the window.<\/p>\n<p>Quickly and easily set up a new MySQL database for WordPress.<br \/>\nQuickly and easily set up a new MySQL database for WordPress.<br \/>\nDownload and Install WordPress<\/p>\n<p>Download the latest version of WordPress.<\/p>\n<p>In order to get WordPress working with XAMPP, we need to unzip WordPress in the right folder. Go to the XAMPP folder on your computer and open the htdocs folder \u2013 C:\/Program Files\/XAMPP\/htdocs.<\/p>\n<p>Unzip WordPress into its own folder and rename it whatever you like. For consistency, I\u2019m going to call this installation of WordPress \u201cWP\u201d to match the name of the database I just created.<\/p>\n<p>My installation of WordPress is called \u201cWP.\u201d<br \/>\nMy installation of WordPress is called \u201cWP.\u201d<br \/>\nOpen the WP folder where you saved WordPress, find the wp-config-sample.php file and rename it wp-config.php. Open the file and scroll down until you see the following lines:<\/p>\n<p>Update your wp-config.php file with your database details.<br \/>\nUpdate your wp-config.php file with your database details.<br \/>\nThese lines of code define the login details for your database:<\/p>\n<p>Replace\u201cdatabase_name_here\u201d with the name of your database, which in my case is \u201cWP\u201d<br \/>\nReplace \u201cusername_here\u201d with \u201croot\u201d and leave \u201cpassword_here\u201d blank<br \/>\nSave the file and close it<br \/>\nNow we can get on with actually installing WordPress.<\/p>\n<p>Open your browser and go to http:\/\/localhost\/wp\/<\/p>\n<p>You should see the translation screen that comes before the famous five minute WordPress installation process.<\/p>\n<p>Choose the language you want to use WordPress in.<br \/>\nChoose the language you want to use WordPress in.<br \/>\nOnce you\u2019ve chosen your language, continue onto the next screen and enter your username and password details. Click Install WordPress.<\/p>\n<p>Your WordPress installation is now complete!<\/p>\n<p>Setting up WordPress Multisite<\/p>\n<p>Having Multisite setup locally provides an efficient way to test themes and plugins in a Multisite environment, but also makes it a quick and easy to have multiple instances of Multisite set up.<\/p>\n<p>Open your wp-config.php file again and add\/edit the following lines to activate Multisite\u2019s installation mode:<\/p>\n<p>define(&#8216;WP_DEBUG&#8217;, false);<\/p>\n<p>define(&#8216;WP_ALLOW_MULTISITE&#8217;, true);<\/p>\n<p>\/* That&#8217;s all, stop editing! Happy blogging. *\/<br \/>\nview rawenable-multisite hosted with \u2764 by GitHub<br \/>\nOpen XAMPP and ensure Apache and MySQL are running.<\/p>\n<p>Login to your localhost site in your browser and under Tools you will now have a new option, Network Setup.<\/p>\n<p>Enter a name for your network and your email address, then click \u201cInstall.\u201d<\/p>\n<p>WordPress will prompt you to edit your wp-config.php and .htaccess files.<\/p>\n<p>Following the onscreen instructions, open wp-config.php and add the following lines underneath your previous edit:<\/p>\n<p>define(&#8216;WP_DEBUG&#8217;, false);<\/p>\n<p>define(&#8216;WP_ALLOW_MULTISITE&#8217;, true);<\/p>\n<p>define(&#8216;MULTISITE&#8217;, true);<br \/>\ndefine(&#8216;SUBDOMAIN_INSTALL&#8217;, false);<br \/>\ndefine(&#8216;DOMAIN_CURRENT_SITE&#8217;, &#8216;localhost&#8217;);<br \/>\ndefine(&#8216;PATH_CURRENT_SITE&#8217;, &#8216;\/&#8217;);<br \/>\ndefine(&#8216;SITE_ID_CURRENT_SITE&#8217;, 1);<br \/>\ndefine(&#8216;BLOG_ID_CURRENT_SITE&#8217;, 1);<\/p>\n<p>\/* That&#8217;s all, stop editing! Happy blogging. *\/<br \/>\nview rawsetting-up-multisite hosted with \u2764 by GitHub<br \/>\nNext, open .htaccess. If you can\u2019t find it, make sure hidden files are displaying on your computer. If you do not have a .htaccess file already, then create it in the same directory as your wp-config.php file. If you do have a .htaccess file, replace any existing lines with these new ones:<\/p>\n<p># BEGIN WordPress<br \/>\nRewriteEngine On<br \/>\nRewriteBase \/<br \/>\nRewriteRule ^index\\.php$ &#8211; [L]<\/p>\n<p># add a trailing slash to \/wp-admin<br \/>\nRewriteRule ^([_0-9a-zA-Z-]+\/)?wp-admin$ $1wp-admin\/ [R=301,L]<\/p>\n<p>RewriteCond %{REQUEST_FILENAME} -f [OR]<br \/>\nRewriteCond %{REQUEST_FILENAME} -d<br \/>\nRewriteRule ^ &#8211; [L]<br \/>\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(wp-(content|admin|includes).*) $2 [L]<br \/>\nRewriteRule ^([_0-9a-zA-Z-]+\/)?(.*\\.php)$ $2 [L]<br \/>\nRewriteRule . index.php [L]<\/p>\n<p># END WordPress<br \/>\nview rawmultisite-htaccess hosted with \u2764 by GitHub<br \/>\nMultisite should now be installed.<\/p>\n<p>You\u2019ll need to log in again, and when you do, you\u2019ll see the WordPress dashboard from where you\u2019ll be able to access individual sites in your network.<\/p>\n<p>Wrapping Up<\/p>\n<p>XAMPP provides an easy way to run a local server environment on your Windows machine, allowing you to test and develop locally, rather than installing WordPress on a live site. It will also save you a bunch of time since you won\u2019t have to install and uninstall WordPress each time you test themes and plugins.<\/p>\n<p>The great thing about XAMPP is it\u2019s free and open source. You can set up as many installations of WordPress as you want and it\u2019s just as easy to get Multisite up and running.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now I shall show how to install XAMPP on Windows. It not much more hard. It is very easy. Once you have installed your computer will be act like as a web server. You will&hellip;<\/p>\n","protected":false},"author":2,"featured_media":154,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"_links":{"self":[{"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/posts\/152"}],"collection":[{"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":5,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":160,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/160"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=\/wp\/v2\/media\/154"}],"wp:attachment":[{"href":"http:\/\/www.texeltech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.texeltech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}