In your browser, navigate to 'localhost/wordpress'. You will see a message that tells you a configuration file must be made. Click Create configuration file and on the following page, click Let's Go! Enter wordpress for your Database Name, root as your User Name, and leave 'Password' blank.
Contents
- What is localhost?
- Installing XAMPP Server on your Linux
- Installing WordPress on the Localhost
How To Install Wordpress On Xampp Localhost Pdf To Excel File
In our previous posts, we have discussed, how you can install WordPress in a web hosting site likeBluehost. Have you ever imagine that this CMS (I am talking about WordPress) can be used offline also? Yes, you can use it offline and without buying the web hosting from any site.
You can install WordPress on your computer with the help of localhostserver. If you don’t know what a localhost server is, don’t worry you get to know about the localhost server in this post.
Click here if you want to Start a self-hosted Blog on WordPress.org.
Installing WordPress on your Console is very helpful. You can test and experience the platform (WordPress) freely. You would be thinking that if we can install the themes and plugins or not? The answer is you can use this whether you installed WordPress in the localhost or on the web host, WordPress will work like the same. The only difference is that you will be the one who can see the blog.
In this post, I will share how you can install the WordPress locally using XAMPP server (other localhost servers also present, but I will recommend you to install XAMPP).
What is localhost?
In computer networking, localhost is a hostname that means ‘this computer‘. Every website or blogs you are looking are hosted on the servers. Now, what is a server? A server is nothing but a computer where the data is stored. When the computers are connected in through a network(or web), then these computers are called web servers.
When you are purchasing a hosting (or we can say some web space) for your blog, then your data is stored at web servers. But when you store the database and files of your blog on your own computer then it is referred as localhost.
To create your computer as a server we need an application (software). Here, XAMPP will do the work. It is a compilation of Cross Platform, Apache HTTP Server, My SQL Database, PHP, and Perl. It manages the databases, PHP codes, etc.
Now you have to follow the steps to install WordPress on your Linux localhost.
Installing XAMPP Server on your Linux
Downloading XAMPP
The first thing you need to do is download the XAMPP application. To do that you need to visit the website My Apache Friends (https://www.apachefriends.org/download.html) and search for the version for your Linux in the Download section.
Installing XAMPP
Installation of Xampp is a little bit tricky but don’t worry you can do with a few minutes.
- First of all, fetch the downloaded file(xampp setup) to the desktop. It is done to make the installation easier.
- Try to install it by double-clicking it.
If the setup runs then its a very good news for you. You can jump to Step 4.
But if the setup does not occur don’t and shows the error, then follow the next step. - Open terminal and Enter the following command
su root
(it is used to make you super user)
cd Desktop
(this command is used to tell the console to make the current directory as Desktop )chmod 755 xampp-linux-x64-7.0.20-0-installer-run
(chmod is used to change the mode to access the file. Here chmod 755 is used to tell the console that we are accessing the file as read and write format becoming an owner)sudo ./xampp-linux-x64-7.0.20-0-installer-run
(this command is used to tell the console to do something. Often used to open any file) - Wait for 10 secs and the dialogue box will appear. The setup wizard is opened.
- Then next steps are pretty simple, Just click on next options.
- Your XAMPP is installed in the Directory /opt/lampp. Click on Finish, and Launch the Application
Next time when you want to launch the application, just enter the following code in the terminal. - Click on Manage server
There you will see three options. You have to startMySQL Database and Apache Web Server. - Open any web browser and type localhost/phpmyadmin in the URL and press Enter.
- You will see a page. That’s your localhost home page.
Cheers .. You have successfully installed XAMPP on your Linux. Now you have to install WordPress on the localhost. Don’t worry it won’t take much time.
Installing WordPress on the Localhost
On the very beginning, you have to visit the WordPress.org (official website), to download the WordPress CMS.
- Download the zip file from the website. (It is free to download)
- Go to the location where the zip file(wordpress) is downloaded, and extract it to the htdocs folder, which is located inside the LAMPP folder (Directory:- .opt/lampp/htdocs )
Note: The contents of the WordPress folder is only readable. You cannot edit it directly. So have patience and follow the steps. - Open your web browser and type URL localhost/wordpress and press enter. You will see the following web page.
Click on Let’s Go - In the next step, you have to fill the following form by changing the values of
Database – wordpress
Username – root
Password – (keep it blank)
Click on the Submit - Now they will provide you the code. Just copy the code.
Create a notepad file at the Desktop. Name it as wp-config.php and paste the code in it. - We have to move the notepad file to the wordpress folder which is present in lampp/htdocs.
Since the wordpress folder is only readable that’s why we are unable to paste it directly.
We have to make the folder read and writable, to do so type the following command in terminalcd /opt/lampp/htdocs
(this code changes the directory to htdocs)
sudo chmod -R 77 /opt/lampp/htdocs/wordpress
(it makes the components of the folder read and writeable) - Now paste the notepad file (wp-config.php) in the wordpress folder.
- Again move to the set-up which you were doing in the web browser and Click on Run the install.
- In this step, you have to fill the following form as per your wish where Username and Password are mandatory.
- Your dashboard will open
After working on WordPress save the things and close the browser. Then open the XAMPP application and click on Stop All and close the window.
But if you want to open the XAMPP again then you have to follow the following instructions. You have to enter two commands in your terminal.
Opening the Xampp Application
- Open the terminal
- Write the command
sudo /opt/lampp/manager-linux-x64 .run
(this code will run the application forcefully through terminal) - Open your web browser and enter localhost/wordpress
- The sign in page will open. Fill the form using the information you have at the time of set-up.
Hurray.. You have installed the WordPress in your localhost. Yeah, it is a bit difficult but you can do it easily, just don’t lose the patience. Now when you have installed the WordPress start inspecting all the options and edit the things. You can download the plugins or install different themes.
If Error Occurs on Installing Plugins or Themes
You may find an error of FTP. Don’t worry just follow the steps:
- Go to the directory opt/lampp/htdocs/wordpress
- Open wp-config.php
- Add the syntax define(‘FS_METHOD’, ‘direct’);
You can add this syntax anywhere in the file. - Save it
- Now you can install plugins and themes.
You will notice that you can upload the themes and plugins after downloading. You will also notice that it works faster. Whether you are offline or online you can write the post edit the settings. Then only thing is that no one can see your blog.
CONCLUSION
I have mentioned that there are many localhost servers if you want to install any other. But the basic steps will be same. When you have installed the WordPress in your localhost you can avail all the features of the WordPress.org.
We cannot say that the WordPress will work fully offline, as you have to install the plugins or themes, then you definitely should have an internet connection.
If you own a blog which is on a web server then you cannot directly test any plugins or themes there on your dedicated blog. In case you want to test the plugins you can run it on your localhost WordPress. There is also an advantage that no one is going to watch your blog at the localhost.
For the newbies, it is very useful to gain the experience and knowledge about the platform.
I hope you this post has helped you and if you want for posts on blogging then keep visiting our blog. You can share this guide to your friends so that this guide may help them also.
If you want to test your new WordPress theme before you go live, then one way to do it is to install WordPress locally on your PC. WordPress requires a web server such as Apache or IIS with support for PHP and MySQL running locally on your Computer. This is where XAMPP (Cross Platform web server package containing Apache, MySQL and PHP) comes to rescue.
In this tutorial we will go through the steps to install XAMPP on a Windows PC.
Installing XAMPP
XAMPP is available for multiple platforms, including Windows, Linux, Solaris and Mac OSX. First you will have to download the one for your needs, and install it.
1. Download XAMPP
In this guide, we are installing XAMPP 1.7.3 (latest version) on Windows. This version consists of the following components:
Apache 2.2.14 (IPv6 enabled) + OpenSSL 0.9.8l
MySQL 5.1.41 + PBXT engine
PHP 5.3.1
phpMyAdmin 3.2.4
Perl 5.10.1
FileZilla FTP Server 0.9.33
Mercury Mail Transport System 4.72
2. Download the EXE file and then simple double click on it to start the installation. By default XAMPP is installed to C:. Leave the destination folder as it is, and click ‘Install’. This will install XAMPP to a folder named ‘xampp’ in your root drive (C:).
3. It may take quite a while (~ 10 minutes) for XAMPP to extract the package.
4. After the contents are extracted, the set up script will run automatically. A series of questions are asked, the first one being ‘Should I add shortcuts to the startmenu/desktop?’.
Enter y and hit Enter.
5. In the next step, you are asked to locate XAMPP paths correctly. Press y for ‘Should I proceed?’.
6. In the next step, you can choose to install portable version of XAMPP on a USB drive. However, you will not be able to use services with a portable installation.
Enter n and and press Enter if you like to go ahead with the normal installation.
7. The setup will now relocate XAMPP to the correct path if required. Once you see the ‘XAMPP is ready to use’ message, hit Enter to continue.
8. Next you will see a message informing the time zone that was set in php.ini file. Again hit Enter to continue.
9. In the last step of the installation, you are given various choices, amongst which the first one is to start the XAMPP control panel. Note that even if you exit the set up at this point by entering x, you can always start the XAMPP control panel either from Start Menu or desktop shortcut.
For now, enter 1 and hit Enter to start XAMPP control panel.
Starting Apache and MySQL
In XAMPP control panel, click on the Start button for both Apache and MySQL. In case Windows Firewall shows up a security alert, click ‘Allow Access’.
Now you should the status as ‘Running’ for both. In order to confirm that a web server is currently running on your PC, open http://localhost in your browser. This should bring up the XAMPP splash screen.
Click on a language of your choice to open XAMPP admin panel.
How To Install Wordpress On Xampp Localhost Pdf To Excel Converter
If you want to check the status of the XAMPP installation, simply click on ‘Status’ in the left navigation. All the services that are currently activated on your local web server are shown.
Xampp Localhost Directory
That’s it. You can now go ahead and install WordPress on XAMPP for your local WordPress theme testing and development activities.