Installing WordPress Locally.


WordPress Installed

INTRODUCTION:

There is quite a bit to do before installing WordPress and in this post I’m talking about my experience, what it was like for me to install a SINGLE WordPress site on my local machine so that I could migrate a website to WordPress and create a dedicated Theme, a Theme unique to me that still benefits from all the other benefits of using WordPress such as plugin support and SEO.

An update! 07/08/2022. I am about to start using Laragon.

I will uninstall my WordPress instance and start afresh with Laragon. Read on as it’s all relevant depending on your choices. But as a Developer I need the quickest route to completion of a new website or WP theme.

I was using Xampp for local development until about a year ago when I found Laragon & I haven’t looked back since. This is seriously the most powerful local development tool I have in my entire “developer toolkit”. I started working for a new company about 2 months ago & their entire team was using various setups for local dev and were always encountering problems. Setting up a new project locally was always a nightmare for them due to mysql version conflicts, having to change php versions, etc. When I introduced Laragon to them, they were amazed at how easy it was to install, maintain and how flexible it was to update/switch their dependencies. My manager told me that since the team has started using Laragon for local dev, project setup time has gone down from an average of 6 HOURS, to less than 30 mins. AMAZING.

https://laragon.org/

Unlike many developers I will constantly update my Post based on the latest releases of software.

First Job: Install XAMPP.

First thing to do was install XAMPP, I already have WAMPSERVER64 installed but for the WordPress installation XAMPP was advised. A long time ago I had an problem installing WAMP because it used the same Port number as a Windows application but on the last install after having re installed my laptops OS I had no such problem.

XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages.

Google.

What is better WAMP or XAMPP and how do they compare.

If you ask us, we would say WAMP is an ideal choice if you are only using Windows OS and PHP programming language. If you are a beginner, then WAMP is the ideal choice. However, when it comes to experienced programmers, XAMPP is the ideal server. Here they get to add additional features.

Here’s link if you want more information on WAMP v XAMP.

https://www.positronx.io/xampp-vs-wamp/

Why am I installing WP?

I decided to install WordPress locally so that I could recreate my HTML website ‘Cuse80sMusic’ as a WP site and create effectively my own WP Theme. I failed on first attempt so here I go again.

I installed XAMPP for the Web server and the database control using PHPMyAdmin. I had the bright idea of Exporting the WP database from my hosting service and importing it using PHPMyAdmin, well, I didn’t think that one through properly for a start. All I really wanted was the database name and the user name so that I could create those locally for later exporting to my hosting service. Incidentally in the long run I want to host my websites on my own server using a fixed IP address. Anyway, Importing the database wasn’t the right thing to do as I wanted to install WordPress as a fresh installation, all I did was install the WordPress data on my PC from my hosting provider. So after sleeping on it I deleted the tables from the database that I imported, so no tables.

I downloaded WordPress 6 and copied the files to the HDOCS directory in the XAMPP directory. I have just deleted the WordPress directory because I want to try installing WordPress into the HDOCS directory using the TAR.GZ download as this should install the WordPress directory ‘wordpress’ in the HTDOCS directory. This will use a new extract programme from NCH Software once that software is installed if it’s not already. The Compression programme will show you the directory structure in the WordPress folder and extract them to a folder called ‘wordpress’ within HTDOCS.

ZIP SOFTWARE FROM NCH

So far the Database has been created, the User has been created, the WordPress directory in HTDOCS has been installed. All I should really need to do now is go to the browser and type into the browser at the top of the page ‘/localhost/wordpress/…’ GO to here for the instruction I used to installed WordPress but follow me to see how my installation went.

Incidentally I had already written my Cue*0sMusic website using the Bootstrap system and create the files using the the PHP include function which enables me to slot in new pages to my code, all the files including the index page have .PHP file extensions or they wont run in WordPress as you need a Webserver to serve the pages to the browser using pure HTML as that all your browser understands, that and CSS of course, CSS being the style or layout instructions.

No I am using WinSCP FTP software to check the directory structure on my hosting provider for my WordPress files. So I will need login details from my provider. I’m using Fasthosts who provide me with 48 hr login username and password, as well as port number, this detail changes every 48 hours for security reason.

FH Temp Connection credentials as an example.

They also provide the Hosting details e.g. server details. I’m doing this using the Mobile Phone network by the way. I don’t have a fixed IP or Broadband installed where I am as I write this so I could loose my connection at any time but so far that has not happened. So as expected my WordPress files are in the WordPress folder at root level in my domain.

INSTALL WordPress.

So after typing in localhost/wordpress/wp-admin/install.php I have installation question for WordPress.

WP Installation Questions so a success on this part.

Just to clarify again. PHPMyAdmin installed, Database created, I did import my Hosting providers WP database but then deleted all the existing tables so at least I know that my Hosting providers DB is exactly as mine is for WP installation. User created. Downloaded the WP files and installed in the HTDOCS folder using a Zip programme. Checked my Hosting providers file structure matches mine for export to that provider once the WP Theme is created.

What You NEED!

Multiple WordPress Themes and general config.

Now I may well want to run multiple WP Themes in one database so the last box in the following image may be different to your but I’m now going to make sure I know the Table Prefix for multiple installations.

Installation of WordPress (wordpress should be WordPress la la!)

Remember this is MY EXPERIENCE of installing WP for the first time on a Local machine. I do have prior knowledge so I do have a good idea of what I’m doing but this is my first time installing it locally/ All previous experience has been by using a hosting service installation for a SINGLE WP installation. For the full details of this process refer to WordPress.

OK Sunshine run the installation.

DO! Take a note of the Password if it’s a suggested one. I didn’t.

Success.

So if everything works out you will have an installation of WP without having to watch a YouTube video!

OK, so now I’m going to take a break. Then I will be back to talk about my experience off transferring my Cue80sMusic website into WordPress. A note. I created Cue80sMusic because I wanted to experiment, it was a lot of work and I did succeed in achieving my aims and for that reason I keep it running, it took a lot of work and if I can get it running in WordPress then that’s another major success for me because I did break a few rules in creating it. For that reason I discourage search engines from accessing it because it does break some rules but it was and is an experiment for me.

I’ll be back with detail of the migration process.

Installing WordPress on my local 12 year old Toshiba laptop that still amazes me even 12 years later. One day I hope to afford a new machines for to meet all my other desires which is Video production and Drone work. So much still to do and little time to do it.

UPDATE

Tried logging into the WordPress application after the end of the install but received a rather large error message.

wordpress login fatal error requires c:\xampp\htdocs\wordpress\wpcontent\themes\twentytwentytwo\inc\block-patterns.php

Phil Donnelly.

So I couldn’t login into the application, a quick search of the web didn’t identify my problem though I did see that some mentioned ensuring I was using the latest version of PHP. I don’t really know why the message above was displayed but I will say that line 130 was the end of the file, the last line of code in that block-pattern.php meaning that if it had to provide an error message then why not the last line of code because it couldn’t execute it. So I downloaded and installed the most up to date version of PHP, the version that came with XAMPP was from 2020. After down loading and installing the latest version of PHP I decided to install Bitnami XAMPP and then I was able to complete the installation of WordPress.

I later shut down the PC, restarted, fired up XAMPP and logged into WordPress with the Username and password given after installing BITNAMI, not from the original installation.

Welcome to WordPress
The New Theme creation begins

WordPress is now installed on my local PC. I have started building the new Theme around a ‘none publicised’ website called Cue80sMusic. I have called my Theme BriteMusic which I’m planning on making a fully fledged WP theme. This is a completely new Theme and I’m coding in a way I have never done before which means I have given myself a pretty steep learning curve because I’m also having to learn to code with PHP again and in a new environment.

Incidentally AlecAdd on GitHub and YouTube is helping me with my progress. I found Alec on YouTube and I now follow him on GitHub.

Phillip.

P.S. I’m thinking about telling everyone about my MacPro 5.1 that became a Windows Server. The MAC OS was limited so I got shot of that and made it a Windows PC. Some ask HOW! Though after my energy bills go so high I decided it was time to scrap the thing anyway, it was power hungry with it’s quad core twin processors.

Leave a Reply

Your email address will not be published.