• Hi,
    I am new to WP, wamp, and virtual hosts.

    I’ve created virtual hosts for project in C:\wamp\www\XYZ to ensure smooth transition to live server. I intend to create the website XYZ.com using a wordpress theme.
    WAMP is working fine and I can access a test page too.

    Should I simply unzip contents of WordPress Zip Installer into XYZ folder and proceed to build website?

    The first step is to create database from phpadmin. Which is the best option for creating database-collation, utf, ascii…? I don’t need a database as of now, but to make the website futureproof or best practice what is best?

    Should I repeat the same step of installing a new WP instance for any future website?

    Thanks and Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t need a database as of now

    A common misconception, you may not think that you need a database, but your WordPress mechanism does. If you are running WordPress then you are using a database, it is simply the most appropriate and scalable organisation.

    It doesn’t seem to matter that much which collation character set is chosen, largely because when the text is limited to English or even western european, then they all work much the same.
    I use CHARSET=utf8 COLLATE=utf8_bin
    If you are using foreign languages, then your choice should reflect the native representation of that language.

    Thread Starter markIV2015

    (@markiv2015)

    @rossmitchell Thanks a zillion for your help and for dispelling my misconception about DB. Am I right about unzipping the WP zip installer’s contents into the project folder to create a website locally in WAMP?

    In the past, I have successfully installed WAMP 2.2 and WordPress3.x and multi sites, without any problems on my Windows 8.1 PC.
    Now, I cant. With virtual host, localhost does not seem to work as the DB address… Here is what I did and the problem I face.
    – I installed WAMP 2.5 on my PC yesterday (fresh install, not upgrade) using Firefox.
    – I then created 2 folders, c:\wamp\www\grece (put a index.php file and a few php files in it) and c:\wamp\www\wordpress where WordPress 4.1.1 was extracted.
    – I created a database with PhpMyAdmin called wp-test-1
    – I created a user called “jas” with all priviledge on all database and a password.
    Reading that it is better to create Virtual hosts before installing a CMS, I did create virtual hosts by modifying/adding to the following files:
    1) c:\Windows\System32\Drivers\etc\hosts adding

    127.0.0.1   localhost
    127.0.0.1    grece wordpress
    ::1          localhost
    ::1          grec wordpress

    2) c:\wamp\bin\apache\apache2.4.9\conf\httpd.conf removing the # before Include… around line 515

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    3) c:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf remove the lines that are examples (dummy etc) and added localhost, grece (I have a project named “grece”) and wordpress:

    <VirtualHost *:80>
      ServerName localhost
      ServerAlias localhost
      DocumentRoot C:/wamp/www
      <Directory "C:/wamp/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local
      </Directory>
    </VirtualHost>
    <VirtualHost *:80>
      DocumentRoot C:/wamp/www/grece
      ServerName grece
      ServerAlias grece
      <Directory "C:/wamp/www/grece/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local
      </Directory>
    </VirtualHost>
    <VirtualHost *:80>
      DocumentRoot C:/wamp/www/wordpress
      ServerName wordpress
      ServerAlias wordpress
      <Directory "C:/wamp/www/wordpress/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local
      </Directory>
    </VirtualHost>

    I restart all WAMP services and reboot my PC. I reopened WAMP. The icon is green. I clicked on the icon, select “My Projects” and then “grece”. My project opens in a new window. I reclick on the icon, select “My Projects” and then “wordpress”.
    A new window opens: https://wordpress/wp-admin/setup-config.php?step=1&language=fr_FR. I fill in the fields then “send”. I get the page “https://wordpress/wp-admin/setup-config.php?step=2&#8221; saying it cannot choose the database. It says it is able to connect to the database server meaning user and password are OK but cannot connect to the database.
    I think it is “localhost” , the database address that is wrong but I do not know what else to put.
    Any suggestion anyone?
    Thanks in advance, it is driving me nuts!

    I finally resolve the issue, it works fine now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to install WP if using virtual hosts for project in WAMP’ is closed to new replies.