Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Thursday, October 18, 2012

WAMP Step 2: Install PHP

As detailed in our previous post, we are building towards a WordPress installation on a desktop PC. In step 1, we successfully installed and tested the Apache web server.

As mentioned last time, some documents that are served by the web server to your web browser are static documents - just files sitting on the hard drive. Other documents are actually queries into a database, where the data has been dressed up and presented as a web page. Still other documents are mostly static, but with some customization by a script running on the server.

To support WordPress, we are going to need both a database and a script engine. A very popular scripting language for web pages is PHP, and that is what WordPress requires. The rest of this post will walk through installing PHP.

Wednesday, October 17, 2012

WAMP step 1: the Apache httpd server

Our goal in this process is to set up WordPress to serve the test content of a website and blog. Therefore the very first thing we are going to need is a web server.

I should say at the beginning that you don't need a web server to test basic web pages, you can write HTML files with any text editor, and then point your web browser at the file. You can teach yourself a lot of HTML and client-side JavaScript programming in this way. I think it is better to learn the fundamentals of how web pages work by typing it out for yourself instead of starting with a web development environment - you really understand what is going on.

Web servers deliver content to browsers. This content (web pages, music, images, etc.) is either a file on your machine's hard drive, or data stored in a database (on the hard drive). If it is data from the database, then a program (a script) must be run first to turn it into a document that is served out by the web server.

So even before we set up our Apache web server, we need to set up some space on our hard drive where this content will live. Importantly, we want this space to be independent of the Apache server file structure, so that we can back it up separately, and update Apache if necessary without moving our content. We could even change web servers entirely and our content would still be in the same place.

Setting Up WordPress on a Desktop

My wife is setting up her business and wants to have a website with blog, etc. Great! She'll be getting her domain name and contracting with a web hosting company - we haven't decided which at the moment.

For the blog support, I'm going to test WordPress, since it is very popular. Being the geek that I am, this means setting up WordPress on our home desktop machine.

WordPress (WP) runs on top of several other popular Web tools. Apache is a free web server, PHP is a free scripting engine, and MySQL is a free database. If these tools were running together on a machine using the Linux operating system the whole stack would go by the acronym LAMP. Since I'm using a Windows PC, it will be a WAMP stack for me.

While there are products that claim to install WP and all of these prerequisite pieces of software, I'm going to do it myself and write series of blog posts about the process.

Wish me luck!

ps - The process I will follow is based on Jessie Forrest's blog. Thank you Jessie for putting so much in one place! My posts will include a little background info and changes to the process Jessie posted a few years ago, based on the problems I encountered and how I solved them.