• I have been asked to manage a wordpress website. I am using WAMP on my local computer. I have successfully downloaded the files from the htdocs folder on the website. I also was able to export a copy of the database from the site. What I want to do is create a duplicate site on my computer using the existing URL slightly altered to help me distinguish between the 2 urls and not accidently work on the real site. I have altered the URL to read mysite.org-dev (adding the -dev after org) I did a search and replaced all the live URLs with this new one on the database files. I went into the system32/drivers/etc/hosts and added a line as follows.
    127.0.0.1 mysite.org-dev.
    I altered my config.php file replacing the user name and password with the ones I have been using locally. I changed the database name to the one that I imported. I then changed the host to mysite.org-dev. What else do I need to do to get this site working on my local computer? Someone said that I need to create virtualhost on my apache files, but I don’t know how to do this. I simply want to add features to my test site and then upload the results to the live site. Thanks!!! I am using Dreamweaver as a tool, but am willing to look at other options.

Viewing 4 replies - 1 through 4 (of 4 total)
  • What else do I need to do to get this site working on my local computer?

    This depends in part on the WAMP release, and the system its run on (apparently a Windows system here).

    For Apache 2 (reread: Apache 2), on Windows boxen I’ve had no luck working with virtual hosts the way I do in Linux (which I prefer). But this doesn’t seem to fail for me:

    1. Edit Apache’s httpd.conf file (typically in a conf sub-directory to your Apache install, but check the documentation for your release). In it, typically at the end, to add an Include line to a (possibly at this point non-existent) virtual-hosts.conf file. Here’s how mine looks:

    Include "F:/WAMP/Apache2/conf/virtual-hosts.conf"

    2. Create, or edit, your virtual-hosts.conf file. Typically it will begin:

    NameVirtualHost *:80

    After that should come the VirtualHost directives (each virtual host must have its own). Here’s an example bit of code:

    <VirtualHost *:80>
    	ServerName foo-dev
    	DocumentRoot f:/www/dev/foo
    	<Directory f:/www/dev/foo>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride all
    		Order allow,deny
    		allow from all
    	</Directory>
    </VirtualHost>

    In your case you’ll want to use:

    ServerName mysite.org-dev

    as well as provide the correct path for DocumentRoot and Directory path directives.

    Anyway, lots more on this sort of thing to be found out on the Internets. One adequate doc on the topic:

    http://johnbokma.com/windows/apache-virtual-hosts-xp.html

    Thread Starter lzweigle

    (@lzweigle)

    Thanks for the information. I will give it a try!

    Thread Starter lzweigle

    (@lzweigle)

    Well, I’m still having difficulty. Here is what I did
    1. I went into wamp/apache2/con/extra/httpd.vhost. and added the following lines

    <VirtualHost *:80>
    ServerName mysite.org-dev
    DocumentRoot c:Documents and Settings/My Name/My Documents/mysite-org-dev/public_html
    <Directory f:/www/mysite.org-dev/public_html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>

    2. I went into the system32/drivers/etc/hosts and added a line as follows.
    127.0.0.1 mysite.org-dev

    3. I went into config.php and changed the dataname to the datafile that I had downloaded. I changed the DB User to ‘mysite.org-dev’.

    4. I restarted my Apache service. I noticed that when I tested my connection to the database I got the message HTTP 404. All I changed was the datafile name and the DB User from localhost to mysite.org-dev.

    5. When I went to the browser and typed in http://mysite.org-dev, the screen that loaded was the standard WAMP screen that loads when I type in http://localhost.

    Being a almost 60 novice at this, I am striving to understand what to do. Thanks for your help!!!!

    The only things I can suggest looking at are:

    1. c:Documents and Settings/My Name/My Documents/mysite-org-dev/public_html

    Seems to be missing something there at the start of the path.

    2. f:/www/mysite.org-dev/public_html

    That path doesn’t seem to match, in any way, your DocumentRoot. Should they not be the same?

    Keep in mind I can go only so far helping with this, partly because my skill set on the topic is limited, but mainly it’s one far better covered on other forums. And this is anything but a WordPress problem, which is something we like to focus on here. :)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Manage Live Site from local Test Computer!’ is closed to new replies.