Setup a Development Server

There are a few different options here and this page will evolve over time to include some more ideal, but complex methods of getting ready for development with PHP and MySQL. The below forms a basic explanation to build your understanding.

Apache

As we’re going to be using a server side technology, in this case PHP we need to be able to host PHP files. The best way to achieve this is to setup our computer systems to run what is known as Apache. Apache is a server software which is open source and designed to run various server side languages, but mainly PHP.

As of August 2020, 36.5% of the worlds active websites are hosted on Apache based servers followed swiftly by Nginx (w3techs.com, 2020) - another server software.

Install MAMP

In order to begin developing with PHP you’re going to need to install something which will allow your computer system to interpret PHP code. In this case I would recommend that you install MAMP. You can find MAMP here - https://www.mamp.info/en/windows/

It’s free of charge (at time of writing) and has some excellent features to get you going on your path to learning Dynamic Website Development.

This is not the most ideal solution. Normally it would be best to develop with a server setup which mirrors closely, if not exactly what you intend to launch your website to when live.

Mirror a Server

In the last section we discussed the need to setup a server to host our PHP files. It was mentioned that the best case scenario would be to have a server setup which mirrors what you would be using when the website itself goes live - a replica of the live server, with the same versions of software installed etc.

This is important for a few reasons:

  • We know that what we build will work when it goes onto the live server
  • We can test any potential updates/changes to the website/website software
  • We can also test any updates, including security patches on a development server before releasing these to the live server

There are different ways you achieve this type of setup, and the way you achieve this really does depend on what server operating system and software you are using in the first place.