Install and Setup Local Version of WordPress

After downloading a local version of WordPress and creating a local database I was able to install WordPress.

To do this on the command line type:

Localhost/’put the name of your local wordpress folder here which you have just created’


I then entered my database name () and username (root) leaving the password blank

The below screen then indicated I didn’t have a wp-config.php file.  To resolve this I renamed the wp-config-sample.php file in the local wordpress folder to wp-config.php and pasted the below text into the file.

I then got the below error:

After research I learnt I needed to amend the wp-config.php file and enter the database name, user and password in the file so the database connection can be established.








Once I had amended the the wp-config.php file and ran the install command again I was then able to install WordPress successfully:

Localhost/’put the name of your local wordpress folder here which you have just created’

Log in Screen to Local Version of WordPress

Once logged in this is the local WordPress Dashboard

This is the link to access this local version of WordPress



Download Local Version of WordPress

So the WordPress template which I will create from the static version of the website can be tested locally I need to download a local version of WordPress onto my laptop to run alongside XAMPP the local server also on my laptop.  Testing the template on a local version of WordPress allows you to correct any errors and develop it further without affecting live files on the internet.

To download the latest version of WordPress I went to the website (below) and selected the download WordPress option.

The download indicates a .zip will be downloaded 8.3MB in size.





When I had download the file and looked in the Download folder I did not have a .zip file but a WordPress folder:

Thinking this may cause problems later and was incorrect I searched


After researching online and looking at the structure of the files in the downloaded wordpress folder these looked correct.














Now go to the XAMPP main screen and select ‘Open Application Folder’ open the htdocs folder listed.  Create a folder for all the WordPress files and copy the extracted files and folders into this WordPress folder.

Local htdocs folder after creating a WordPress folder and copying the downloaded WordPress files into here:









XAMPP – Local Host Download and Initial Problems

All my work with WordPress up to now has been done on the live web.  To be able to develop a WordPress Theme from the static version of the website I needed to set up a local server so I can develop the WordPress theme locally before uploading it to the web.

I choose XAMPP a local web server because it is the most popular PHP development environment. Source

It is extremely easy for developers to create a local web server for testing purposes. Everything you need to set up a web server – server application (Apache), database (MySQL), and scripting language (PHP) – is included in a simple extractable file. XAMPP is also cross-platform, which means it works equally well on Linux, Mac and Windows. Since most actual web server deployments use the same components as XAMPP, it makes transitioning from a local test server to a live server is extremely easy as well. Source

XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P).  Source

Go to XAMPP – and select download for Windows, Linux or OS X.  The Udemy Blog Post helped me to download and install XAMPP –




























Once installed to access XAMPP your local web server open chrome and type in localhost in search bar this then brings up the XAMPP local home page (see below) and phpMyAdmin is available from here.









These are all the folders listed when ‘Open Application Folder’ is viewed:
















It is only the htdocs folder I will need to use:





Once installed you can then view and ‘Manage Servers’ from the main screen.  I found that the MySQL Database would intermittently stop running and I had to restart it sometimes unsuccessfully forcing me to restart my computer and then restart the MySQL Database which did then always start:






Error Log – I looked at the error log to see if I could see why the server had stopped.

To rectify this I searched forums and XAMPP support including the ‘Stackoverflow’ website for advice –

After uninstalling XAMPP and reinstalling it I found that the MySQL Database Server now runs successfully and has not shutdown.