Run WordPress local with XAMPP
Introduction#
With XAMPP you can install a web server on your local pc. It has an Apache web server, the database MariaDB (MySQL) and works with Perl and PHP. After the installation you are able to run and debug e.g. content management systems like WordPress on your local pc. You can use it with Windows, Linux, Mac OS X and Solaris.
1. Installing XAMPP
- Download the installer for the current version of XAMPP
- Go through the installation wizard and change nothing if you are not sure what you are changing.
- After the installation you see the XAMPP control panel.
Just click the start button of Apache and MySQL to run both with the basic configuration. 4. If your computer is connected to a local network, and you want access the web server from other computers too, be sure that your firewall allows it.
2. Setup a database after installing XAMPP
To run WordPress on your computer you need to configurate a database first. Be sure that Apache and MySQL are running (see Installing XAMPP step 3)
- Start a web browser of your choice and enter “localhost” in the address.
- Choose your preferred language and select in the category “Tools” ->
phpMyAdmin
. - Select the tab
Databases
. - Enter the name of your database (you will need this name later) below “Create database” and choose
utf8_general_ci
in the dropdown “Collation”. - Click at your created database at the left side and select the tab
Users
. - Add a new user by clicking at
Add user
. - Enter your username, choose
local
in the “Host” dropdown (if you want access the database from other computers in the network chooseAny host
) and enter your password (you will need this later too). - Check if below “Database for user”
Grant all privileges on wildcard name
is checked. - Press
Go
.
3. Installing WordPress after setup the database
After you installed XAMPP and setup the MySQL database you can install WordPress.
- Download the latest version of WordPress.
- Unzip the file and insert the folder in the root directory of your webserver (if you used the suggested path during the setup of XAMPP it is “c:\xampp\htdocs”).
- All files which existing twice can be replaced.
- Enter in the address field of your webbrowser “localhost/wordpress/wp-admin/install.php”.
- After choosing your language click
Continue
and thenLet's go
. - Replace all the default text fields with your chosen configuration (see ”Setup a database”). Don’t change “Database Host” and “Table Prefix”, except you want to migrate your local WordPress installation online. Then keep in mind that security is important. You find more information in Set Prefix in New WordPress Installation.
- Press
Submit
and thanRun the install
. - Now you have to enter the name of your site, an username, password and a valid e-mail.
- Click
Install WordPress
to finish the setup and log into your new local WordPress site.