Step By Step Guide to Setting Up Your Local Web Server

This tutorial is besides suitable for setting up your local anesthetic WordPress server. Testing many things ( CMSes, themes etc. ) on the internet for me and many others is sometimes a big trouble and it has many disadvantages .
You need to buy a knowledge domain, wage for host, use your internet providers slow upload speeds to upload a files over file transfer protocol, and whenever you want to change some configuration of Apache or PHP you have to contact your hosting provider and wait some time until they respond. I could continue with early disadvantages, but I think you get the picture .

Your Designer Toolbox
Unlimited Downloads : 500,000+ Web Templates, Icon Sets, Themes & Design Assets

speckyboy freelance
4662?subId1=learn ipa 091620 There are many all in one packages, which will install all together like WAMP or XAMPP, but I do not like them. In my opinion, they make a set of uncontrolled folderol on the computer and they are not much up to date. But they are beneficial as a very fast solution for people who do not want to learn how it all works and they only need the fastest way to install local anesthetic network server, to test their projects.

This tutorial is more complicate than a WAMP or XAMPP solution but the biggest advantage is that you have all over your control – because you configure all by yourself. And you can be constantly up to date and enjoy the latest fixes and improvements in Apache, PHP and MySQL packages .
ampere soon as you master this tutorial, you will agree that a local server can be installed using original packages in a few minutes, like the WAMP or XAMPP. Updating with new packages is besides actually simple. Just install the new box over the existing one and that is it .

Who Should Read This Local Web Server Setup Tutorial?

This tutorial is big for web developers and vane designers who need real-time test of web-based applications or themes for WordPress, Joomla, Drupal without indigence of an internet connection or network host .
It will besides cover and make you mindful of all the most important mistakes and unexpected errors which sometimes happen that early tutorials much do not cover. So users who will follow this tutorial tone by step, should have a working localhost web waiter without any unexpected errors by the end .
I decided to write this tutorial because I followed many tutorials on the web, but I was not able to get my servers to work on the first judge, so I spent many hours of searching and fixing unexpected errors, which are all covered in this tutorial .

Quotes in Tutorial

I much use quotes to put syntax, commands, login names, passwords, paths, and the names of the folders between them .
sol whenever you see quotes in the tutorial, always use only what is between the quotes. It will be marked as bold textbook besides. sometimes there are quotes between quotes, these quotes ( between quotes ) are crucial to use in shape files .

Requirements

This tutorial was made on 32bit Windows 7 Ultimate in VMware Player, but I am using it on a actual initiation of 64bit Windows 7 Ultimate without any problem. I have besides used it on a 64bit translation of Windows Vista Ultimate before .
indeed in that case it should work on any Microsoft manoeuver system. even if the packages are 32bit they do work on 64bit operating systems without any incompatibility issues. There are unofficial 64bit packages for Apache and PHP, but their facility is a lot more complicated and they are not much updated. alone official support for 64bit operating systems has MySQL, but it would not work by rights with 32bit Apache and PHP .

Downloads

If you find any raw versions of these packages, you can use them besides, the steps will be the lapp .

Pre-installation Steps

1. For better orientation I often create a specific booklet structure for initiation and for the folder where my test world wide web pages are stored. I recommend you to follow the same structure ; differently you will have to change all paths to your own settings during the tutorial steps .
The beginning directory I create is called “ dev ” ( from the bible development ) in the root of “ C:\ “. The second directory I create is called “ progs ” in “ C:\dev\ ” and the third is called “ www ” in “ C:\dev\ ” So after that you should have three new directories .

  • C:\dev\
  • C:\dev\progs\ – for the installation of Apache, PHP and MySQL
  • C:\dev\www\ – this folder is like the ftp folder on your hosting, so you will extract all your webpages here

2. Users of Windows XP can skip this gradation ! It is for Vista, Windows 7 and 10 users ! disable UAC ! You will do it by clicking on Start > Control Panel > User Accounts and then click on “ Change User Account Control settings ” .
On the following window ( remembering the default put of the skidder ) pull the slider down to “ Never notify me when : … ”, chatter on OK and close the windows. Vista users – just turn off User Account Control .
Do not restart the calculator nowadays ! For security reasons the luger should be reverted to default settings after successful initiation of Apache, PHP and MySQL .
3. Modify the Windows hosts file. In some cases I could not get the facility exercise until I did this step. I did not test this on Windows XP, so XP users can besides probably skip this step, because in my opinion it is not needed .
This charge called hosts is much placed in “ C:\Windows\System32\drivers\etc\ “, it is shroud and it is read merely. To see concealed files go to Start > Control Panel > Folder Options, snap on tab “ View ”, choose “ Show hide files, folders, and drives ” and then click OK .
On x64 systems it will not be visible in 3rd party 32bit file managers like Total Commander even if you set settings to see shroud files and folders, because 32bit programs can not see 64bit files and folders .
so voyage to this directory through Windows native file Explorer to get to the hosts file properly. Open the file in notepad, search for the line : “ # 127.0.0.1 localhost “, delete the “ # ” symbol, save the file and now you can restart the calculator to apply both settings .
now we are done with pre-installation Steps .

Apache installation and configuration

Run the initiation of Apache, cluck next, check that you accept the terms, click next and next again. On the following blind meet in the Server settings, like on the word picture below, and click adjacent again .
apache 01
On the future page choice Custom Setup Type and pawl following. All features leave as they are, change entirely the initiation way to “ C:\dev\progs\Apache\ ” and pawl Next .
now click install. After the initiation you should see raw icon on the windows taskbar with a belittled green triangulum which signalizes that Apache is installed and running .
apache 02
To test it properly open Internet Explorer, Firefox or whatever browser you are using and type “ localhost ” into your savoir-faire bar. If everything went well you should see “ It works!
now we need to edit the Apache configuration file ! Go to the booklet “ C:\dev\progs\Apache\conf\ ” and open the file “ httpd.conf ” in Notepad .
For better, more comfortable edit, I recommend advance text editor like Adobe Dreamweaver or release PSPad, because you can see argumentation numbers and navigation through the text file will be more comfortable .

  1. Go to line 117 or search for “#LoadModule rewrite_module modules/mod_rewrite.so” and delete the “#” at the start of the line – in other words uncomment the line (good for nice URLs)
  2. Go to line 178 or search for “DocumentRoot “C:/dev/progs/Apache/htdocs”” and replace it with “DocumentRoot “C:/dev/www”
  3. Go to line 205 or search for and replace it with
  4. Go to line 208 or search for “Options Indexes FollowSymLinks” and replace it with “Options Includes Indexes FollowSymLinks MultiViews
  5. Go to line 225 or search for “AllowOverride None” and replace it with “AllowOverride All
  6. Go to line 240 or search for “DirectoryIndex index.html” and replace it with “DirectoryIndex index.html index.htm index.php
  7. Go to line 382 or search for “AddType application/x-gzip .gz .tgz” do not replace anything, just add new line below this line with text “AddType application/x-httpd-php .php

That is it, save the file, exit the editor program and restart Apache. You can do it by clicking on the taskbar Apache icon and then move the cursor on the Apache 2.2 and pawl restart .
At this state if you point your browser again to “ localhost ” you won ’ triiodothyronine see “ It works ! ” but just something like “ Index Of ”. Do not worry, it is ascribable to changing the directory from where Apache translates the web pages. Apache installation and shape is now completed !

PHP Installation and Configuration

Run the download PHP install package. Click Next, accept the terms and click Next again. On the next filmdom chatter Browse and navigate the installation program to install PHP to “ C:\dev\progs\PHP\ ” and cluck Next .
now select Apache 2.2.x Module and chink Next again. At this mistreat you need to tell the installation course of study where the Apache configuration file ( we have edited in apache configuration ) is .
therefore navigate the installation by clicking on the push button Browse to the directory “ C:\dev\progs\Apache\conf\ ” and cluck Next. On the following screen click Next again and then on the Install .
If all went well you should see following fresh lines at the end of Apache configuration file “ httpd.conf “ :

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/dev/progs/PHP/"
LoadModule php5_module "C:/dev/progs/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

now we need to configure the PHP shape file “ php.ini ” which is in the booklet “ C:\dev\progs\PHP\ “, then open it in Notepad, PSPad or Dreamweaver and change the lines like this ( the PHP should besides work with the master php.ini, but these changes are recommended for more comfortable using ) :

  1. Go to line 458 or search for “memory_limit = 128M” and change it to “memory_limit = 512M” (define how much memory can PHP use)
  2. Go to line 531 or search for “display_errors = Off” and change it to “display_errors = On” (if there are some errors it will be shown in web browser, if this settings are set to on)
  3. Go to line 542 or search for “display_startup_errors = Off” and change it to “display_startup_errors = On
  4. Go to line 728 or search for “post_max_size = 8M” and change it to “post_max_size = 100M
  5. Go to line 879 or search for “upload_max_filesize = 2M” and change it to “upload_max_filesize = 2000M
  6. Go to line 959 or search for “;date.timezone =” and replace it with “date.timezone = “XXX/XXX”“. Where the XXX/XXX means your actual position, for me it is Europe/Prague, to find your position look here. For example for people living in Brazil – Sao Paulo, it should look like this “date.timezone = “America/Sao_Paulo”

That ’ s it. Save the file, exit editor program and restart Apache. now we need to test if the PHP works. indeed navigate to directory “ C:\dev\www\ ” and create a modern text file called “ index.php ” and put this ” ” as a textbook inside, save the file and die.

Open your web browser and distributor point it to “ localhost “. If PHP is successfully installed you should see the lapp like on the following visualize .
php test

MySQL Installation and Configuration

This is the easiest separate, because all is configured in the initiation charming. Just run the MySQL facility file. Click next, choose Custom and then click Next, change the initiation directory to “ C:\dev\progs\MySQL\ “, click Next once more and then Install .
After the facility completes you will see another screen, therefore once again chatter, Next, Next, check “ Configure the MySQL server now ” and uncheck “ Register the MySQL server now “, then click Finish .
On the adjacent shield click Next, then select “ Detailed Configuration ” and click Next, choice “ Developer Machine ” and click Next, choice “ Multifunctional Database ” and chink Next, other screen leave as is and pawl Next, blue-ribbon “ Decision Support (DSS)/OLAP ” and suction stop Next .
now check “ Enable TCP/IP Networking “, leave port number 3306, check “ Add firewall exception for this port “, check “ Enable Strict Mode ” then click Next .
Select “ Best Choice For Multilingualism ” and chink Next. Check “ Install As Windows Service “, choose service name “ MySQL5 “, check “ Launch the MySQL Server automatically ” and check “ Include Bin Directory in Windows PATH ” then click Next .
Check “ Modify Security Settings ” and as a “ New root password ” use “ root ” without the quotes, confirm password, other things leave as they are and chatter Next. concluding step is to apply all settings we have done, sol click on Execute and wait until you see this :
mysql
If you do not see this picture there is something amiss. And it should be many things. I will try to help in comments. But I expect there will not be any problems .

phpMyAdmin installation and configuration

phpMyAdmin is web-based MySQL database coach. For me personally it is the best and easiest solution for managing and creating databases even if it runs on localhost .
There is a solution from MySQL developers called MySQL GUI Tools, which runs on Windows operating systems, but it is not providing the easiest survey and it is a bit chaotic for me. besides many users using world wide web host services for their world wide web pages knows phpMyAdmin very well .
I much install WordPress, Drupal, Joomla and vBulletin together to test themes etc. and I use a single database for each CMS so that is why I use phpMyAdmin, which allows me to create databases in a friendly way without cognition of the MySQL command credit line .
We will start with creating a directory called “ pma ” in “ C:\dev\www\ “. now open the zip code file with phpMyAdmin and extract all message of the directory “ phpMyAdmin-3.3.2-all-languages ” to “ pma ” directory .
now open your favorite web browser and point it to “ localhost/pma ” if you are lucky, you should see the phpMyAdmin login screen. You can login to phpMyAdmin by entering “ root ” as the login name and password .
sometimes on Vista and Windows 7, possibly on XPs operating systems excessively, you will get some kind of error saying that PHP is not installed or configured by rights. This is one of the very much unexpected errors which I was searching for a solution for many hours, before I solved it !
The solution could be childlike – first base is go to the directory “ C:\dev\progs\PHP\ “, find a charge called “ php5ts.dll ” and copy it to “ C:\Windows\ ” and “ C:\Windows\System32\ ” directories and restart Apache. Maybe Apache will refuse to start and it will show errors, if so, ignore the erroneousness and start again. It should work now ! : )
After this fix you should see the phpMyAdmin login foliate by pointing your browser to “ localhost/pma “. If the beginning solution did not help the trouble has a batch to do with Windows write folder permissions and PHPs seance save path and Temp directories .
PHP has no rights to write to desired Temp directories. This trouble is truly individual and if person will report it in the comments I will help him/her individually .
so login to phpMyAdmin and you will get to the phpMyAdmin database administration interface. On the left panel, you will see actual databases, which is crucial to run MySQL by rights, so do not delete them at any time .
On the right side you will see some information about your network server, you can change a theme or speech or create a raw database. On the bottom you will see some errors, which we are going to fix. For basic use it is not necessity, but I can ’ metric ton bandstand something showing errors : – )
first gear we must create some tables to unlock phpMyAdmin ’ s wax likely, therefore at the leave gore click on the database called “ test ” and then click on “ Import “ .
phpmyadmin
After that, click on the Browse button and voyage phpMyAdmin to the folder “ C:\dev\www\pma\scripts\ ” and select a file called “ create_tables.sql ” and in phpMyAdmin in the right bottom corner click on “ Go “. It will create a new database called phpmyadmin with 9 tables .
It will be used for phpMyAdmin advance features, like creating PDFs etc. You can close the browser and look advancing to the survive part – editing phpMyAdmin configuration charge : – ). indeed go to the booklet “ C:\dev\www\pma\ ” and open file “ config.sample.inc.php ” in Notepad, Dreamweaver or PSPad .

  1. We need to edit line 18 defining the blowfish secret passphrase. It is completely up to you what you enter between the quotes so it can look for an example like this “$cfg[‘blowfish_secret’] = ‘ 1M41Oie6q9E3w#7U0M^3f3Tyzr5r93 ‘;
  2. Go to line 36 and replace “$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;” with “$cfg[‘Servers’][$i][‘extension’] = ‘mysqli’;”
  3. Now we need to delete “//” at the start of the following lines:
(also change default pma user to root)
$cfg['Servers'][$i]['controlpass'] = 'root'; (also change default pmapass password to root)
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

Save the file in the same booklet as “ config.inc.php ” and exit the editor program. phpMyAdmin should now work without any errors and we are done with the whole facility of the localhost web waiter. nowadays you can restore your UAC settings as we were talking about at the begin .

Optional – installing CMS (WordPress 2.9.2)

first we must create a newfangled database for WordPress, so login to phpMyAdmin and under the textbook “ Create New Database ” fill the name “ WordPress ” and click on Create .
now go to the booklet “ C:\dev\www\ ” and create a new booklet called “ wp “. If you have downloaded the WordPress 2.9.2 installation open the zip code file and extract all content of the WordPress directory to “ C:\dev\www\wp\ “ .
Open your browser and point it to “ localhost/wp “, If all was done well, you should see first the WordPress facility page, so snap on “ Create a Configuration File ” and then on “ Lets go! ” On the following page .
On the follow page fill in the database appoint, which is “ WordPress ” and User Name and Password which is “ root ” for both. This is the password for WordPress to write tables in the database not for accessing the CMS admin panel .
All early values can stay as they are, suction stop “ Submit ” and then “ Run the Install “. Fill in the Blog title, as you wish and in the electronic mail airfield, enter any true e-mail address. Sending emails will not work because our Apache is not configured for sending emails, but who cares ?
We do not need it on a localhost ! ; – ) then continue with the install. On the following screen you ’ ll see your login and password, write it down somewhere, and cluck on “ Log In ” to get to the WordPress admin interface. here you can change the password to something easier to remember .
You are done. If you point your browser now to “ localhost/wp ” you will see something like this :
wordpress
now you know the basics of how to install any other CMS you prefer. Installations of Drupal or Joomla are very similar .

Conclusion

I told you that it is not so complicated ; – ) If you are like me, you like a dependable coffee bean in your favored café ( which unfortunately has no internet association ). And if you like to work in the company of people and not be entirely at home or in an function, you will probably appreciate this tutorial.

Most of you are most probably using WAMP or XAMPP solutions, some of you are using my solution in a more advance way, which Apache configurations offer, but I know many web designers and web developers who do not know about these solutions and this tutorial is precisely for them .
If you are facing any problem let me know and I will try my best to help you .
This military post may contain affiliate links. See our disclosure about affiliate links here .

source : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also

articlewriting1

Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.