Have you ever tried to install WordPress on LocalHost ? If you’re a newbie then it’s for you; WordPress, the most Popular, Free and Open Source Blogging tool and a Dynamic Content Management System (CMS) based on PHP and MySQL is used by every second person when it comes about creating a website. It’s an awesome platform where you can actually start learning how to decode and tweak themes and plugins with it’s user friendly theme editor, in short the basics of web designing.
Most of the times while you tweak your active wordpress theme, your visitors will be able to see the on-going changes over the site which might disturb them while reading the contents. And if coding’s go wrong then the theme might get broken and your visitor will simply press “Ctrl+W”.
The best practice is to install WordPress on localhost of your system, create dummy contents of your posts, pages, tags, comments, themes and then finally import those content to your localhost and begin your theme tweaking without disturbing your actual theme which would be live on your blog.
This may be a known topic for most of the people, but as the bloggers count is rising now-a-days, most of the newbies are unaware of the same and practically don’t know how to install wordpress on localhost using XAMPP. It is a collection of easy-to-install web servers – in other words, programs that let you test dynamic web pages locally. Download the installation files from below and check out the guide on how to setup your wordpress blog on the localhost.
XAMPP Windows 1.8.0
1. Download XAMPP files from the above links, all of them have the similar files just that installer file involves a easy process of installing XAMPP and the zip & 7zip contains the files inside an archive and you just need to extract them and run. For Windows 7/Vista users, due to insufficient write permissions in C:\Program Files, I recommend to use alternate folder for XAMPP i.e. C:\xampp or C:\Abhisek\xampp
2. If you have already installed XAMPP on your system from before on, then open setup_xampp.bat and press 1 and hit enter to refresh all its paths and files.
3. Open xampp-control.exe and stop the MySQL process (if it’s running). Click on start beside Apache and then start MySQL process. You can use the XAMPP Control Panel to start/stop all server and also install/uninstall services.
4. Open your browser and in the address bar provide an IP address of 127.0.0.1 or type http://localhost to open your localhost running by XAMPP. You can check the status of XAMPP by selecting ‘status’ from the left sidebar to know about what’s running and working, and what isn’t working.
5. Check from the bottom of the sidebar, you’ll find phpMyAdmin under the tools section. Go to your phpMyAdmin page from there.
6. The default language will be in German, so before proceeding kindly change the language to English from the Sprache-Language drop down option. Well it doesn’t matters if you know German language and are comfortable; you can proceed with it!
7. Go to ‘Databases’ from the top navigation menu and create a new database named ‘wordpress’ and keep the beside option same as ‘collation’. After it is created you can see your database in the list below.
8. Select ‘Privileges’ from the nav menu at the top and click on ‘Add a new user’ below the user list. Provide an username and password and select the host as ‘local’. Keep the database for user as none and scroll down below to ‘Global Privileges’, click on ‘Check all’ and at last hit on the ‘Create User’ button.
9. After the creation of database and user, it’s now time to grab the wordpress source files. Go to http://wordpress.org and download the latest version of wordpress. After downloading the archive, extract it to a folder and you’ll find it contains only one folder named ‘wordpress’ and the rest of the files are inside it. Cut that folder, browse to your XAMPP location and paste it inside the ‘htdocs‘ folder.
10. You’re almost there! WordPress have been installed on your database, all you need now is to set it up. Go to your browser and type the URL : 127.0.0.1/wordpress/
It will show that there is no wp-config.php file present and would ask you to create one for the localhost server. Proceed ahead and click on ‘Create a Configuration File’.
11. You can see the WordPress welcome message after that and it will tell you to know about the database name, database username and password, database host and table prefix. Hit on ‘Lets Go’ and provide the username and password which you have set in Step 8 i.e. under the ‘Privileges’ menu. Leave the rest options as it is and click on submit and after that run the install.
12. Tadda! It’s done. You’ll be asked for the famous five minutes installation process. Type in your site title, provide an username for the administrator role, your password twice and your email address. Last but not the least, untick the last option of privacy i.e. “Allow search engines to index this site”. Well it depends upon your privacy choice. Click on install WordPress to complete the WordPress installation on your localhost.
13. Log in to your new blog running on the localhost. You may import your blog’s posts and pages into the localhost as the dummy content which will be needed for tweaking your themes.
The best part is you don’t need to upload your large theme files from the WP Dashboard as you can directly paste them in the wp-content/themes/ folder in your xampp’s htdocs folder location.
Tweak/Customize your theme at localhost and then after completely customizing it, you can upload the theme files to your main web server of your blog. This is the best practice when you’re about to customize your current theme which is live on your blog. This is the foremost objective of installing wordpress in your localhost. Follow up the video tutorial of the same, for better understanding about the installation. Share if it helped you! Cheers.