How to install WordPress or other CMS locally with XAMPP
Why work locally?
Many people prefer to work directly online in order to avoid making an extra step in addition to any problems, but setting up an on-site work environment allows for several benefits.
- You can use it as a copy of backup, as well as being the recommended choice for any update of the platform, so as not to have any unpleasant surprises.
- Use it as a test environment , or simply for personal experiments.
- In case of absence of a internet connection for disservices, you can continue working without too many problems and carry on your project.
Let's move on to the facts
Which to choose?
There are various programs that can be used depending on the OS used, MAMP (once used only for Mac environment, now also Windows), Xampp (for both Unix and Windows systems), Lamp (for linux environments), Wamp (for Windows environments). Today we'll see how to set Xampp .
Let's start by going to the official website and proceed to download for the platform used. Then download the latest version of the CMS that interests you. If you are downloading WordPress, check out tips .
At the end of the download if you have downloaded the installer of Xampp let it start with a double click and follow all the steps of the installation wizard....
In case of Linux environment, go to the download folder and right click on the installed program, then go to Properties --- Permissions and assign the permissions 755. Once done, double click on the installer and follow the installation wizard. If you have any problems or problems, you can consult the following wiki .
To start the program open the terminal and run the following command:
sudo / opt / lampp / xampp start
Management of the individual components of your test server is possible from the XAMPP control panel. Several buttons are available in the XAMPP control panel:
- Config: allows the installation of XAMPP and its individual components
- Netstat: indicates all processes running on the local computer
- Shell: opens the UNIX shell
- Explorer: opens the XAMPP folder on Windows
- Services: shows all services running in the background
- Help: offers links to help forums
- Quit: closes the XAMPP control panel
What we are interested in is starting the Apache and MySql. server
Create a database
Started MySql you need to create a db, nothing easier, open your favorite browser and in the address bar write:
http: // localhost / phpmyadmin /
You will find the following screen
Now click on new and enter the name of your db.
As a recommendation, use the site name, so that when you have many sites to manage locally they are easily identifiable, obviously when you pass everything online you will have to change the name in wp-config. Alternatively you can use the name of the db assigned to you by the provider and use that by adding the site name at the beginning, in order to delete only the initial part.
What to do next?
Set the folder
First we go to the htdocs folder inside Xampp (but it is also valid for other programs).
For Windows go to C: \ xampp \ htdocs
For Mac go to the program folder and enter htdocs
For Linux / opt / lampp / xampp / htdocs
In this folder you will create a sub-folder with the name of your site (this is my advice) or any name you want.
Almost finished ready...
Code Code Code
If you have done everything well just write in the address bar http: // localhost / sitename and the normal installation of the chosen CMS will start.
Remember that when they ask you to enter the credentials to connect the database they change depending on the software used. !