How to setup website on your own PC or localhost (Without the need for a server).
So, is there a simple way to set a server on your pc which can run php code, here follows some simple steps which may help us do so.
Step 1:
INSTALL A SOFTWARE BUNDLE ON YOUR PC
software bundles such as:
XAMPP
WAMP
many more.
can be used.
where AMP stands for (Apache, MySQL, Perl/PHP/Python)
there is also another set of bundle which includes PostgreSQL instead of the well known MySQL and these bundles which including PostgreSQL are called LAPP and here are the some links LAPPStack, MAPPStack and WAPPStack.
Step 2:
COPY THE WEBPAGES OR CODES ON THE FOLDER DOCUMENTROOT
like c:xampp/htdoc for XAMPP, different bundles have different documentroot (name the home page appropriately)
Step 3:
CHANGE DATABASE PASSWORD, USERNAME , URL IN DBA WEBPAGE
like in XAMPP there is a link to the DBA webpage we can go to by clicking on it.
by default the password is root username is root.
when we create a schema as they call it, it will give us a link to the database that we have created, store this address which we will then use to connect to the database later, in that connection command of specified language.
Step 4:
GO TO THAT LOCALHOST WEBSITE BY TYPING HTTP://LOCALHOST IN THE BROWSER
by default port number is 80 like in this -> http://localhost:80 URL port number is 80, if there is a change in the port number by default or you have changed it then your website will not open.
verify the port number and enter it in the URL like http://localhost:8080 where 8080 is the port number.
the above steps are not all necessary like step 3, we can also use the same steps to execute php on the local computer.
with regards.
Please follow the blog and share this post.
