Saturday 9 November 2013

How to create a testing ground for your websites

This is for all you aspiring web developers and web hackers. The hardest thing to do is test a website that you wrote before deploying it to the webserver, yes you can run the html files with your browser, but what about php files? or other server side scripts or programs? these are slightly harder to test.
In this tutorial I will show you how to create a server running on your local machine that you can create full website and run them on your local machine. installing a webserver can also help you understand what happens on the other side, how do webservers work and so on. And it also makes it easy to install content management systems like Joomla! and Drupal to test and play with.

First off we will need to download and install server software, we will use the wamp server package that includes the apache server, mysql, php and phpMyadmin. this is basically all you will need to start your own webserver on your computer. you can download wampserver here.

While installing just accept all the default settings. after installation open your browser and in the address bar type localhost it will open up a page like this:


 When you typed localhost it opened up the default page for the website in the apache www directory, you can find this directory if you click on the 'www directory' in the taskbar menu for wampserver:


This opens up a folder on your local computer with 2 php files called: index.php and testmysql.php. You can't open the files from here, because your computer has not associated a program with the filetype, but dont worry you don't need to.

This is the main directory for your sites, remember not to delete these two files, as they are critical to wampserver. but you can create a folder, lets call it mysite, then if you type in localhost/mysite in your browsers address bar, it will open up the default page in this folder, the main page of your site.

I am not going to explain how to write a php or html file but the following site can teach you everything you will ever need to know about writing your own website for free: w3schools

Now the first thing you will want to do is create a database for your site right?
open localhost in your browser, and click on phpmyadmin under tools.

PHP my admin

This is what you will see when you open phpmyadmin. This is your control panel for all databases on the server and this is also where you will create your own database, go to the top right and click on Databases, the following window will open up:

Create new database

Type in a new name for your database and click on the create button, from there just follow the steps, it is all pretty self explanatory.

And there you go, a webserver with a database, on this database you can install a content management system like Joomla! or Drupal, or just use it to store data from your website.



Coming soon: How to create your own joomla site

ps. post any problems you have in the comments, I will see if I can help.

Happy Hacking
MiniMite

4 comments:

  1. Thank you so much! I am brand new to blogging and I would love to be able to start bringing a substantial income to my family. You are an incredible inspiration! I actually feel as though it might be possible for me now. Dark Web vpn for torrenting

    ReplyDelete
  2. You ought to be a part of a tournament personally of the most useful blogs on the web. I am going to recommend this page! Création site e-commerce casablanca

    ReplyDelete