Installing WordPress Locally

The saga continue…

I’ve been reading many tutorials and forums to learn the wonders of PHP and MySQL.  While I’ve had a great time playing with PHP, MySQL and all, it seems like quite the quantum leap to progress from beginner to intermediate.  My approach has been very “bottom up” – reading as much as I can, finding tutorials, writing some simple code, trying to compile it, watching it fail, debugging it, etc.  I think this is a good start and will serve me well as I continue to learn more.  However, the two biggest drawbacks to this trial-and-error approach are slow progress and the lack of direction with my coding.  Without guidance, I am wandering around (somewhat) hopelessly in the dark.

A new approach

The words of one of my first professors still ring in my head: “motivated bottom up.” Good ‘ol Dr. Yale Patt used these words to describe his teaching approach: explain the big picture and use all the little details to fill in the gaps.  How can I implement this strategy into my self-study?

WordPress as a learning tool

I can learn from existing code like WordPress to help direct my studies.  WordPress was recommended by Kilbot (seriously dude, thanks!) for its rich features and ease of use.  It really did take only 5 minutes to install!  My plan here is to see how WordPress works in order to learn from it.  I also plan to tinker with some of the innards to make it do exactly what I want it to.  I should be able to see how they have it all structured, learn how they style their code, and learn what constructs best suit different applications.  I can’t tell you how exciting this is.

Installing WordPress Locally

I used this link for installing WordPress.  I’m still using XAMPP to “host” everything on my own computer. For my own documentation (and maybe to help you too if you’re trying this):

  • Ran XAMPP and created a database using phpMyAdmin
  • Copied all my WordPress files into /xampp/htdocs/wordpress
  • Changed the ‘wp-config.php’ file to reflect the database name, DB username/password
  • Ran ‘http://localhost/wordpress/wp-admin/install.php’ to install

Presto!  It was that easy.  Props to WordPress for making that easy.  My next steps?  Read lots of .php files to see what they do and understand how WordPress is structured.

After I did it, I see that this is documented quite well elsewhere online.  Go me for getting lucky!


I love LAMP: Learning Web Programming

Do you really love LAMP or are you just saying that?

Anchorman references aside, I have been teaching myself web programming in my spare time these last few months.  This seemed like the perfect way to stay fresh considering that my current job is not technical.  It has been a truly eye-opening experience.  Given my electrical engineering background, I thought this would be quite simple.

  • I’ve coded in C and Java extensively (Matlab too!)
  • I feel comfortable with compilers and IDEs
  • I like drinking coffee and staring at a screen for hours

But I am learning that this is a completely different animal – in a good and challenging way.  The first challenge was seeing the big picture – how these technologies intertwine.  Scouring really helped – the amount of information is immense!  I also looked through Craigslist job posts for internet engineers to see what skills employers sought, PHP and MYSQL being the two most popular.  The LAMP acronym came up very frequently.

Learning to love LAMP

“LAMP is an acronym for a solution stack of free, open source software, originally coined from the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and Perl/PHP/Python, principal components to build a viable general purpose web server.”  [from wikipedia]

I think it would be pretty cool to run my old laptop as a server for my own site using a LAMP solution stack, but that is a few steps ahead of the game.  For now, I am focusing my attention on learning PHP and MYSQL at a very high level.  Fortunately, there are many tutorials and tools available to help learn these.

XAMPP: The tool for testing and creating

A friend, Kilbot, made some good recommendations to one of my previous posts.  Since then, I have downloaded XAMPP so I can create/test the websites from my computer.  Without XAMPP, testing any .php file would require uploading the files to a server to run the php code.  This is really slick! XAMPP comes with phpMyAdmin, a web interface to help create and manage the MYSQL database. Using this tool allows me to build the database without having to fully understand the intricacies of database programming. Using XAMPP is a great way to learn web programming since it reduces a few of those barriers.

I can ignore MYSQL until I learn PHP, right?

Not quite – you have to set up the database properly to serve as the foundation for all the code.  I was going about this all wrong until I read this tutorial by Gizmola.  Part one of this tutorial helps beginners such as myself set up the database by creating an entity-relationship diagram.  He teaches how to make the ER-diagram and how to implement the various mappings (1-to-n and m-to-n).  This was something I had not considered.  Considering this tutorial, to make a highly functional website would require having the data structures set up properly from the beginning.

After you eat your vegetables: Ruby, Ruby-on-Rails, Erlang

With all this research, it has been very easy to go down the wrong path or to get sidetracked.  While sidetracked the other day, I found these awesome resources for Ruby and Ruby-on-Rails.  From my understanding, Ruby-on-Rails is the language used to power Twitter.  Both of these sites had great interactive tutorials.  Learning a language could not be easier with tools like these!  I was tempted to just learn these languages and scrap the whole LAMP idea, but I remind myself “first things first” and table the idea.  I really like that I can easily use a command line for this program.  This is really in my comfort zone from using Matlab for so long.

Also while sidetracked, I read about Erlang.  I would be interested in learning Erlang later since it is a concurrent programming language.  Having learned VHDL (concurrent hardware description language), I wonder if this would be easier to wrap my mind around?

Sanity Check

The W3Schools tutorials have been very helpful for learning/remembering HTML and CSS.

So now that I have focused on what languages to learn (PHP and MYSQL) and what tools to use (XAMPP and Notepad++), it is time to make progress on my projects.  It is very tempting to get sidetracked and go astray with the plethora of information available on the web – I hope that by blogging about this I can document my work, review what I have learned, and focus my attention through self-reflection.  This is my rubber duck.

Until next time, I will be learning to love LAMP.

Messin’ with MYSQL – Session 3

Tried PHP tutorial

Got stuck at install (I don’t have a domain or webspace)

Google “free php domain” and find

Create databases graphically and using ‘phpmyadmin’
Create database users and assign privileges using web GUI

Found great tutorial for creating a simple comment forum

Considered Kilbot’s advice (his reply to my last post) [had to do it the hard way first]

Kilbot’s advice:
1.) ezSQL

2.) MAMP for the Mac and XAMPP for the PC

I feel so alive to have a 2am night working on code! They told me I would miss it, but I scoffed!

Messin’ with MYSQL – Session 2

I learn that MYSQL is just for handling the database and that something else interfaces with the SQL queries. That something is PHP. Now I will be reading up on PHP as well. This is turning out to be more involved than I originally thought, but I am not disheartened.

Since I have used Eclipse before, I will likely use that IDE for my PHP builds. Since I am on my work laptop, I will have to do this when I switch to my old Dell, if she still boots.

Here are the website I have been checking out so far: [lots of code templates] [Offical how-to, written for Novice/Intermediates – good] [They have certifications available – I might consider it] [saving for a rainy day] [maybe….I’m skeptical]