You are on page 1of 40

KlikrNet Ungeek Series

How To Develop & Test


Blogs & Websites
On Your Own PC

By Hilmy Omar
With Step-by-Step Guide For

WordPress
Drupal
Membership Site Script
osCommerce
+++

© www.Klikr.net – all rights reserved


How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Copyright Notice

Congratulation!
Resell rights are granted with this report. You may resell or simply give
away for free “As-Is”.
No alterations are allowed whatsoever.

Liability Disclaimer

By reading this document you assume all risks associated with using the advice given
below. Attempts have been made to verify the information given however we shall not
be held responsible for any loss, damages, contradictory information, or errors in this
report.
You implement the information given at your own risk.
All trademarks are owned by their respective brand owners and we are not affiliated to
any of them.

© Copyright www.Klikr.net | All Rights Reserved

2
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

KEEP YOURSELF UPDATED!

If you obtained this report not directly from


me and you would like to get notified of
future updates via my newsletters, please click
the cover image on the left or follow this link
below:

>> Updates Notice >>

3
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

About The Author

I am Hilmy Omar, an online marketer.

I love businesses that can run on auto-pilot and


this was one big reason why I picked this
industry.

I am also a little crazy about webtools, scripts


and software as they enable me to run my online business almost
completely hands-off. Things just can't be better than that.

With that I hope that you too will benefit from all the tools
featured in this guide.

Please keep in touch as I plan to release more guides on other


tools in the future.

Enjoy.

To Your Success,

www.Klikr.net

P.S. You can contact me with questions or feedback at my


support system below:

>> Klikrnet Support Site >>

4
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Compatibility Statement

This guide has been prepared based on a test system built using the following
environment:

● Windows XP Professional SP2


● EasyPHP 2.0b1
● WordPress 2.5
● Ioncube loader win 5.2

Therefore correct functioning on other types of machines and configuration cannot


be guaranteed. As there are numerous variables that are involved, even similar
configuration as the one above may not produce same results in some cases.

Please also take note that the system described in this guide is suitable only for
websites where you have control over the scripts or codes in use. This is sometimes
known as “self-hosted” websites or blogs. As a result, sites and blogs built at some
blog service providers such as Blogger.com and WordPress.com will not work.
Though blogs based on scripts or codes from WordPress.org or similar will be fine
as long as they are able to be installed on your PC.

The systems presented in this guide are meant for website development and testing
purposes only - NOT for production. You will need a different set of applications for
production as it may have different requirements on operating system, stability and
most importantly, security etc.

In other words, this guide is not about how to run a live web server from your PC for
public access. It is purely for closed internal usage and suitable for local testing
purposes only.

5
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Table of Contents
Copyright Notice................................................................................................................................2
Liability Disclaimer...........................................................................................................................2
KEEP YOURSELF UPDATED!.......................................................................................................3
About The Author..............................................................................................................................4
Compatibility Statement.....................................................................................................................5
1.Why Local Testing?........................................................................................................................7
2.Which System Is Best?....................................................................................................................9
3.EasyPHP Installation, Setup and Operation..................................................................................12
4.A Simple Test File........................................................................................................................16
Your Very First Test Website.....................................................................................................16
5.WordPress Installation, Setup & Installation................................................................................20
WordPress Database Setup..........................................................................................................23
Using MySQL phpMyAdmin To Create Database.....................................................................23
Running WordPress on Local PC................................................................................................30
6.What's Next...................................................................................................................................35
7.You Can Do Offline Blog Posting Too.........................................................................................36
8.Resources......................................................................................................................................37
9.Closing..........................................................................................................................................38
How Would You Like To Leverage On Having Cash Pumping Niche Websites, That Updates
Itself, Streaming Videos You Do Not Create!!...........................................................................39
FINAL DISCLAIMER.....................................................................................................................40

6
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

1. Why Local Testing?

Yeah, why take the trouble? you may ask.

Almost all web masters and website owners use hosting services to host their
websites. This is a very common practice since the hosting are the expert for this kind
of job and cost effective too.

Having said that, sometimes it can be very beneficial to have a test system where you
can develop your site locally without having to actually upload your work to your web
host at that early stage.

We may not realize that web applications can actually be run and tested on a PC
instead of a web hosting.

If your site is simply a static site written in simple HTML then there is really no need to
use anything more than just a web browser. Place your files in a folder on your
computer and preview them just like that using the browser.

But what if you want to be able to test new code and scripts?

You could create a new folder on your web host and use that for development, but
then you need to spend time uploading, testing, editing then uploading again. This
can be a hugely time consuming process, tedious and totally unproductive. It can be
costly too especially if your hosting charges go by the bandwidth amount.

A better approach is to test almost everything on a local computer first and then
upload the whole thing once you're satisfied to a web hosting for final checks and
minor tweaks.

And that is a perfect job for a test server. A test server can either be a local server
installed on your PC, or a stand alone server on your LAN (local area network). It is
typically referred as local server.

By the way if you're curious, here's what Wikipedia has for localhost:
http://en.wikipedia.org/wiki/Localhost

Another factor that is very important is to choose and configure your development
server to be very similar (preferably identical) to the server that is used by your
hosting company. I don't mean the hardware specification, but the software version
and configuration.

7
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

If you can keep your development server as closely configured to your production
server then there is less chance of you having compatibility issues when you move
your local content to the production server.

Is it worth the trouble?

Local test has been the playground for superusers that include programmers, web
developers, web designer and the like. Casual users have usually shied away from
this as setting up such a system used to be rather intimidating. Not anymore since the
advent of easy to use packages started to appear in the community.

What was previously done in bits and pieces is now available in one nice installer. A
system that integrates nuts and bolts of a local server system allows ordinary user to
experience a local test environment without much hassle.

Yes having to setup a local test system adds to your lists of tasks but here are some
of the advantages of using this method:

● Make upgrades and modifications without bringing down your website or worse
screwing it up altogether. Busy sites can never afford a downtime risk.
● Save time from doing tests and experiments directly on your web site.
● Introduce new features to a website or blog without downtime risk which can
be costly.
● Test new codes and scripts safely.
● If you're a modder, you sure know that the job will take a lot of changes before
you get a final working version that you can upload to a production site.
Therefore you need to do all testing safely away from a live site.
● Not letting your visitors see what are still under developments, etc.

To some, there is no real alternative for not not doing testing locally.

Ok now, but how do you do it?

Alright, just keep on reading and I'll keep everything as simple as possible for you to
understand and follow easily.

8
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

2. Which System Is Best?

I have been looking for a simple solution to local PC testing of websites for more than
a year. There are many options out there but most will make you mess with myriads
of settings to be maintained. If you're nowhere near being a geek, trying this is not
really recommended. You could be pulling your hair day after day.

Unless tweaking Apache and PHP configs, maintain databases manually using
MySQL commands etc is your cup of tea, it may not be worth it. Also you may not be
reading this ebook if you can handle those already. Just in case you wanted to see an
example of how local server is typically setup, here's a screenshot:

Perhaps you may need to do a couple of modifications like above for the system to
work. If you're unlucky it may not work first time around and you'll have to

9
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

troubleshoot what went wrong and make corrections. For those who are technically-
challenged, this can be quite intimidating.

Here's another example.

If that looks Greek to you than you need a better solution.

Now, worry not!

The system I am going to present here is many times simpler than the “bad”
examples above.

As for myself, I quite enjoy messing with this kind of stuff but at the same time I would
prefer to use the time for more profitable tasks such as promoting and marketing my
online business. Perhaps you do too, I believe.

At one point, I discovered one of the simplest system around but I still need to dig into
files like config.php, .htaccess, hosts.cfg and so on. After much struggle and half-lost
at the end I managed to get things to work. By then I couldn't exactly remember what
were the actual steps I did. Never mind it's working nevertheless.

However when my hard disk crashed and I installed the same system again
afterwards, it failed to work even after lots of fiddling here and there. Clearly it was
beyond my grab. It's not for me, it's for geek! My mission was to find a better one.

So my journey continued.

Long after that I came across another application that is true plug-and-play. It was like
- download, install, run - and my test website is ready to dance in no time, painless!

It's called EasyPHP.

And yes, it's easy and it's free.

10
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Since then all my blog and website testing were done locally on my PC and when
things worked as I expected, I uploaded all the files via FTP to my hosting server and
my website went live with little to no hiccups.

I was then a very happy man ever after!

Now, after using the application for sometimes, I said - hey! there could be other
souls out there who might be looking for the same test system that I have been using.

So I pickup the effort to put all the experiences that I went through into this guide. If
you're a geek, there is nothing new here for you but if you're not, you may benefit
from this I guarantee.

With this, I really hope that this guide will help many people, you especially. My goal
is to provide a guide that's easy to understand even if you're not a geek.

So are you ready? Let's get our hands dirty now.

11
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

3. EasyPHP Installation, Setup and Operation

EasyPHP is simply an application that manages several application into one easy
suite. It comprises of Apache webserver, PHP script and MySQL database servers.

Without EasyPHP, you would have to tweak these three separate applications before
they can work together in harmony. This could mean a lot of headache and frustration
especially for non-techies (geek) and you're very lucky if you finally figured things out.

With EasyPHP, the adventure is just plain sweet. You'll see what I mean as you read
on.

EasyPHP installation starts by downloading EasyPHP installation file from this site:
http://www.easyphp.org/index.php

Once downloaded, run the setup file and you'll see this dialog:

Choose your preferred installation folder then click “Next”:

12
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Installation done! If you use File Explorer you'll see something like this:

13
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Pay special attention to the “www” folder I circled in


red. This is where all your “website” files will have to
be stored otherwise EasyPHP wouldn't be able to locate
them.

Now, go to your PC Desktop Start menu and run EasyPHP:

Start-All Programs-EasyPHP(version)-EasyPHP.

EasyPHP is now running and your PC has now turned into a web server!

14
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Please ensure that you see “Started” messages and green lights are on for
both Apache and MySQL buttons. If not, click either Apache or MySQL
button and select restart. If that doesn't help, exit EasyPHP and run it again.

15
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

4. A Simple Test File

While EasyPHP is running in the background as described above, go to your favorite


Internet browser and enter “localhost” as the URL. You'll then see something like
this:

As we have not created any local website by now, there's no website title displayed
under the “Name” header.

Your Very First Test Website

Short of a better name, let's call this a website even though it's only a few lines of
PHP codes.

The purpose is to show that the setup you have now is actually a web server that is
capable of running PHP codes beside basic HTML.

Create a new folder named “SamplePHP” immediately under “www” folder. You may
choose a different name you fancy but remember to always keep it directly under
“www” folder or lower.

Let me stress this point again. All your “website contents” or “work files” or whatever
you call it have to reside in “www” folder for EasyPHP to recognize. It's that simple.

16
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Next create a file with some PHP codes in it using your favorite web or text editor.
Here I am using Notepad2, which I think a better text editor than the ubiquitous
Notepad that is on every Windows PC out there. Enter texts as shown here:

Then save the file as “index.php” within “SamplePHP” folder we created earlier.

Now, if we go back to the Internet browser and enter “localhost” as the URL, we
will see “SamplePHP” folder is displayed.

17
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Remember, our “index.php” file was kept under this folder. Since it is named
“index.php”, the browser will automatically run this file if we click on “SamplePHP”
folder.

Ok, click the folder now.

You'll see something very similar to this screen shot. It's a lot longer but only a small
portion is shown here. It's telling us the PHP configuration that we have on our
computer or PC.

18
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

If you upload and run the same codes on your hosting server, you'll see the
configurations shown are for that particular machine or server instead. So the result
may be different from this one. Well, let's leave that topic for another time.

In the coming chapters I will show you how to test run WordPress blog that uses
MySQL database. Fortunately, the principle remains the same for many other
systems such as Joomla and Drupal as long as PHP and MySQL are involved.

Don't worry, we are taking this a step at a time.

Let's summarize what we have gone through so far:


• We downloaded, installed and run EasyPHP
• Create web folder and files
• Run localhost
• Run a test PHP file

That's about it for EasyPHP installation and execution. Easy, isn't it?

However, if you still have any issue, please leave me a note as per contact details
given towards the end of this guide.

19
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

5. WordPress Installation, Setup & Installation

In the last chapter we have successfully installed a web server system together with
PHP and MySQL database servers too.

In this step, we are actually building on top of the earlier installation of EasyPHP. The
only addition here is to install WordPress and setup a MySQL database.

If you have not done EasyPHP installation, you need to do it before going ahead by
following instructions in the previous chapter.

For your info, steps that are going to be described below will be very similar to the
ones that you would use to install WordPress on a remote server (hosting server or
'real' web server).

If EasyPHP is already installed and working, let's go download a copy of WordPress


scripts from:

http://WordPress.org/download/

You may see a different current version of WordPress than the one I am using for this
example which is version 2.5. However the steps described below most likely will not
vary that much.

Unzip the installation file if necessary.

Copy WordPress folder to EasyPHP's “www” folder.

20
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

You can rename the folder to any name that you prefer but for now let's just keep it as
“wordpress”.

Now open “wp-config-sample.php” in a text editor such Notepad2 or any text


editor of your choice then enter these parameters:

● database name
● username
● password

21
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

As an example, let's enter these 3 names:

● “wpblog” for database name


● “user1” for MySQL username
● “pass” for password (in real installation, stronger password is recommended)

In most cases, you may safely leave the rest of the parameters as they are.

Next save the file as “wp-config.php”. Make sure you remove


“sample” portion of the filename or your WordPress installation will not
run or show an error.

22
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

WordPress Database Setup

For WordPress to run, it needs a database to be setup with parameters as defined in


“wp-config.php” above.

So let's create a database now.

Using MySQL phpMyAdmin To Create Database

On EasyPHP, first click the EasyPHP icon (see “1” indicator) and next click the
“Administration“ menu selection button.

23
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

A browser window like this will open up:

Click on “MySQL Manager”. Another window will open in the browser and then click
on “Databases”.

24
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Depending on the version that you have, this screen might look slightly differently.

25
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Next you'll see another browser window:

Enter “wpblog” for a new database name to be created. Make sure you enter the
exact same name as defined in “wp-config.php” during WordPress installation.
Click create.

Next we need to assign user(s) to the database. Click on “Privileges” while making
sure you're at the correct database (“wpblog” in this case, by looking at “database”
selection on the left side of the screen.

26
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Click “Add a new User” then you'll see this screen:

27
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Over here, enter “user1” for User name and “pass” for Password and re-type
Password to confirm. Again, make sure you entered user name and password as per
the ones you did in “wp-config.php” earlier.

28
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Then select “Grant all privileges...” and click “Check all” for Global
privileges. Leave the rest as it is.

Click button “Go” to confirm all the settings made.

A user has been created and granted access to the database.

29
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Running WordPress on Local PC

Having installed the WordPress codes and setup the database, it's now time to run it.

Make sure EasyPHP is running in the background then enter “localhost” into your
browser.

Then click on “WordPress”. You'll see WordPress welcome screen below:

30
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

So enter the “Blog Title” and “your email address” then click “Install
WordPress”.

You'll be served with this next:

31
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

Copy the password and then click the “Log In” button and you'll see this:

Enter “admin” for username and use the password you copied or memorized above
and click “Log In” again.

Voila! Your WordPress is now live on your local server.

32
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

In most likelihood, you must already been familiar with WordPress and how it
operates on your remote hosting. This is no different. WordPress behaves exactly as
it does online except that now everything runs locally.

Personally, I would immediately change my password to one that is easier to


remember. Do this by clicking “Users” and then select “Admin”. Enter your new
password and click “save” at the end.

Now you could do whatever you like similar to a hosted WordPress installation such
as customizing the themes, install and test new plugins etc. Those who are more
adventurous may want to start hacking the theme for example.

Now you have the liberty to introduce all changes that you want in the world knowing
it would not mess up your live blog. Yes, nobody is comfortable playing around with a
live site.

You'll also find this setup very handy when it's time to upgrade your WordPress
installation to a new or different version. You could upgrade your local WordPress first
to see if everything works fine such as your themes would display correctly etc before
upgrading your live site. This way you minimize the disruption to your live site which is
a very wise thing to do.

If you're doing considerable amount of modifications, you'll notice dramatic increase


in speed and response that contribute to a higher productivity. There's minimal time
required for uploading and downloading and this will save your bandwidth too
especially if your hosting goes by a quota.

Personally, I use local server a lot when I am customizing WordPress themes to suit
my liking.

Ok, I shall let you explore on your own from here then and hope you enjoy the
experience.

In case you faced any problems while doing the installation, please contact me here:

>> Klikrnet Support >>

33
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

WordPress Local Testing on Non-Windows OSes


Fortunately you're not left without help. If you intend to run WordPress on non-
Windows local machines, go here for plenty of guides:

http://codex.WordPress.org/Installing_WordPress#Installing_WordPress_Locally

Scroll down towards the bottom and look for the “Installing WordPress on your own
Computer” header.

Be prepared though as stepping into the area to build your test system can be quite
challenging.

34
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

6. What's Next

Theoretically, you can use EasyPHP to test run most kind of PHP based scripts
such as WordPress, Joomla, Drupal, Membership scripts, Forum scripts,
eCommerce systems and hundreds if not thousand others.

However if your codes or scripts require more than just MySQL and PHP, you may
have to install additional applications or codes that are needed by the program you
wish to run. In this case, there is no guarantee that EasyPHP will work correctly as
expected.

As the requirements vary widely from one system to another, it's totally impossible
to list down all those here.

Fortunately every program out there most likely will come with their own
guidebook and/or community that eager to help each other. These supports can
be found on their websites, forums, help docs, blogs etc.

I have prepared separate guide books if you want to use this manual to run
several other popular applications on a local PC. Follow the links below to
download your FREE copy of each.

But for now, sorry for keeping these links temporarily inactive while I am working
to complete them.

● Drupal
How To Develop & Test Drupal Sites on Your Own PC

● Membership Site Script


How To Develop & Test Membership Site Script on Your Own PC

● osCommerce
How To Develop & Test osCommerce on Your Own PC

If you have signed up for updates, you'll be notified as soon as I have them ready
for publication. If you've not, please do it here:

>> Updates Notice >>

35
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

7. You Can Do Offline Blog Posting Too


Once you increase productivity by doing offline blog testing, another potential area
for improvement is to move you routine blog posting offline too.

There are several tools that are help you do this and one favorite FREE tool of
mine is MS LIVE WRITER.

You are shown how to do just that at my blog. Just click the link below:

>> How To Write Blog Contents Offline >>

36
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

8. Resources

EasyPHP: www.easyphp.org/index.php
Notepad2: www.flos-freeware.ch/zip/notepad2.zip
WordPress http://wordpress.org
Offline Blog Writing How To Write Blog Contents Offline

37
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

9. Closing

Hey, that was it!

I hope it was simple plain sailing throughout but if there's any issue or feedback,
please leave a note at KlikrNet's community forum at:

http://klikr.net/forum/

Just file it under “EasyPHP Local Test Guide”.

Again, I appreciate feedbacks so let me know if any.

To Your Success,

38
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

How Would You Like To Leverage On Having


Cash Pumping Niche Websites, That Updates
Itself, Streaming Videos You Do Not Create!!

YouTube Video Sites Generator In A Box Will


Let You:
● Add niche specific video sections to any of
your existing websites!
● Just decide on the keywords and you have
a professional video streaming website,
boasting 100s' of entertaining videos in 15
minutes or less!
● Template based dynamic pages allows you
to quickly edit your video section to match
any of your present websites!
Plus so much more...
And the best part is you don't have to worry about
doing any programming yourself.
Installation is a few steps wizard-based simplicity.
Upload to your server then set-and-forget.
Building video sites has never been easier!

Click Here To Read More About - YouTube Video Sites In A Box

39
How To Develop & Test Blogs and Websites on Your Own PC By Hilmy Omar

FINAL DISCLAIMER

Every effort has been made to make this guide as complete and accurate as possible.

However, there may be mistakes in typography or content. Also, this guide contains
information only up to the publishing date.

Therefore, this document should be used as a guide only - not as a definitive source of
information.

The purpose of this document is to educate, and not to provide or imply such provision of
any legal, accounting, or any other form of business advice.

The author and publisher do not warrant that the information contained in this guide
is fully complete and shall not be responsible for any errors or omissions.

The author and publisher shall have neither liability nor responsibility to any person
or entity with respect to any loss or damage caused or alleged to be caused directly or
indirectly by this document.

- END OF DOCUMENT -

40

You might also like