How to install WordPress Locally?
Kicks off the long awaited and requested guidance on creating a template for note blogging platform: WordPress, although probably define it as beginning to be somewhat ‘simplistic as more often is used for the development of real sites with advanced Web CMS and not just for creating simple blog.
The first two lectures will be dedicated to those users who have never installed the platform before today, all that is needed to standardize as much as possible the initial level of preparedness of the players who want to follow the course.
So we begin with the installation locally (on your home PC) platform.
What are the minimum requirements for installing WordPress?
To install WordPress on a home PC, the computer must be set as a development platform and must have the following “equipment”:
- Web server (Apache is the most common).
- PHP (development language that can interpret PHP dynamic pages).
- MySQL (RDBMS – a relational database management system).
The procedure for installing and configuring these components individually on a home PC can be quite tortuous for a novice user, therefore the time were made of the development platforms “prepackaged” where within a single software package contains all the elements required and the installation of which is characterized by a much more user friendly.
One of the most popular development environments is XAMPP: Free software (available on Windows platforms, GNU / Linux, Sun Solaris, and Mac OS X) containing Apache HTTP server, the MySQL database and all the tools needed to use the programming languages PHP and Perl.
We have previously published a guide about installing XAMPP, if your PC is devoid of a development environment I suggest you follow the guide in question to proceed to Installing XAMPP before moving to the next paragraph.
How to install WordPress in less than five minutes?
If you already have a development environment installed and configured on your PC can go to the next step: installing WordPress.
Meanwhile we see briefly what are the steps you need to install WordPress on your PC:
- Create a new database (in which the platform – once installed – will store all data: articles, pages, comments, etc.).
- Download the official site archive that contains the WordPress platform.
- Copy the contents of the downloaded under the root of our development environment (called “htdocs“).
- And finally start the installation process.
Step 1: Create a new database
The first thing we do is create a new database to the blogging platform will store all data that will be included from time to time who owns the blog.
Launch the XAMPP Control Panel by double clicking on its icon on your desktop or for users running Windows, simply launch the menu Start -> All Programs -> XAMPP for Windows -> XAMPP Control Panel and make sure that Apache and MySQL, have already been initiated. Otherwise start it manually by clicking on “start” button as shown in Figure 1.
To manage the database development environment XAMPP provides a free application called phpMyAdmin which allows you to administer a simplified MySQL databases via a browser.
To start phpMyAdmin XAMPP Control Panel, simply click on the “admin” in the vicinity of the line on the MySQL service, as shown in Figure 2.
Or more simply just type in the address bar of any browser the following url: http://localhost/phpmyadmin as shown in Figure 3.
Now, in the field labeled “Create new database” type the name that we assign to our database and immediately click “Create” as shown in Figure 4.
Our database – which we called “yiw“- was created and now can be used to install the WordPress platform.
Step 2: Download the archive containing the official website WordPress
The next step is to download directly from the official website of the platform package to install. From this page you can always download the latest version of WordPress. Just click on the button located right on this page (Figure 5).
Step 3: unzip the archive and copy the files in a folder on your web server
After downloading the file to decompress the archive under the root of our web server.
The root of the development environment installed XAMPP on Windows Operating System is in the following way:
After we located under the folder named “htdocs” inside we copy the contents of which we decompressed.
Now under the folder “htdocs” should be a new folder called “wordpress” containing our platform to install, as shown in Figure 6.
Step 4: Start the installation process
To start the installation process of WordPress platform open your browser and type in the address bar the URL to our directory:
Recall that we set our WordPress platform in a folder called “wordpress“. In this way we start the installation process: first we are shown a notice indicating the absence of a configuration file and asked if we want to create a web interface by clicking on the button in the lower “Create a configuration file, as shown in Figure 7.
Immediately after creating the configuration files are requested data in the database connection should be connected to our platform.
Order we are asked to enter the database name that we associate with the platform. Enter the name of the database that we created in step 1: yiw.
Following is requested database user name in question. In our case we use the default user account credentials MySql, whose username is “root“, not using a password. Please note that a server running MySQL with these settings is open to intrusion, but it is an easy to install locally for development purposes may be fine.
Enter the user name “root” (without the quotes) and leave the password field blank.
As “Database Host ” leave well “localhost“- as the MySQL server is installed on the same PC web servers – and also leave unchanged the field “code table” which will only add the code shown (by default is “wp“but can be altered to your liking) the name of every table that will be created in the database.
If the data are correct, clicking the “Continue “will display a message confirming successful connection to the database, as shown in Figure 10.
Now you can start the actual installation of the platform by clicking on the button at the bottom of the page “Start Installation“.
Should you receive an error message that warns the impossibility of establishing a database connection – as shown in Figure 11 – to proceed with the installation you must manually edit the configuration file (named “wp-config.php“) previously created by web interface. If the installation process goes correctly, you can skip to the section titled “We complete the installation process of WordPress.
Look at the file wp-config-sample.php
If it was not possible to automatically create the configuration file or if it was not possible to establish a connection to the database during installation, you must manually move the file namedwp-config-sample.php.
Let’s modify and customize the connection parameters to our database manually, by acting directly on the filewp-config-sample.php” have to be opened with any text editor (the file is located under our folder “wordpress“).
The lines affected on which we act are as follows:
//** MySQL settings - and 'Get the settings from your MySQL web host **/// //** The name of the database for WordPress **// define ('DB_NAME', 'putyourdbnamehere'); //** MySQL username **// define ('db_user', 'usernamehere'); //** MySQL database password **// define ('DB_PASSWORD', 'yourpasswordhere'); //** MySQL hostname **// define ('DB_HOST', 'localhost');
Configure, where required, the connection data in our database as shown below:
//** MySQL settings - And 'can get the MySQL settings from your web host **// //** The name of the database for WordPress **// define ('DB_NAME', 'yiw'); //** MySQL username **// define ('db_user', 'root'); //** MySQL database password **// define ('DB_PASSWORD',''); //** MySQL hostname **// define ('DB_HOST', 'localhost');
Now save the file with the following name: “wp-config.php” and resume the installation process from the point where we left off.
We complete the installation process of WordPress
Enter the name we give to our blog / site, we show our e-mail and click “Install WordPress“present to the footer, as shown in Figure 12.
Now we will see a screen that will inform the successful installation of WordPress. This screen also contains the username of the administrator of the platform (which by default is “admin“) and password, generated automatically by the system. Below a screenshot of the final installation process (Figure 13).
Run the first login
To connect to the administration panel of WordPress click “Connect” at the bottom of the page of the final screen of the installation process or the address bar of your browser type the following URL:
Will receive the authentication module to allow the newly installed administration of the platform, as shown in Figure 14.
Successful authentication, we will be automatically redirected to the WordPress administration panel (Figure 15).
Typing the url:
you can view the homepage of this blog just installed (Figure 16).
In this first lesson we saw the entire installation process of WordPress on a home PC, so even if never installed and used WordPress You can follow this course without problems.
In the next lesson will give you a quick look at the admin panel in WordPress to get familiar with what are main features of this blogging platform before we get into creating a custom template from scratch.
Do you think the ease of installation may have contributed to the spread of this platform?
Index of Articles in this guide
In order to make the consulting of this guide easier at the end of each article I will bring the index of all the issues treated.
- How to Install WordPress locally?
- WordPress: Let’s have a look at the Administration Panel
- How to Create a WordPress Template Starting from Scratch?
- WordPress: How to Create the Theme header? (part 1) (part 2)
- Let’s take a look at WordPress Loop
- Adding the Sidebar to our theme
- WordPress: how to make dynamic the Header and the Sidebar of the template?
- Hierarchy of the templates and their use: how to create a template for the articles?
- How to Create Personalized Templates for WordPress Pages?
- Using the Widgets on the Sidebar of Our Template
- Personalizing the Template of WordPress Comments
In tutti questi anni abbiamo ricevuto centinaia di richieste di approfondimento sulle numerose tematiche del web design vissuto da freelance. Le abbiamo affrontate volta per volta. Ma ci siamo resi conto che era necessario fare qualcosa di più. Ecco perché è nato One Year Together, un vero e proprio master per web designer freelance che apre finalmente le porte al mondo del lavoro.
Scopri One Year Together »