Hi there,
So we had a developer work on our site but now that it's up on production, I want to bring it down to my local development machine. I'm curious how to go about this. Basically, must I start with a fresh Drupal install on my box or can I get away with just downloading the files (and data or course) from our production server?

So far on my dev box I've got a working WAMP setup and a copy of the production database locally, so that's square, and I've downloaded the entire live site's doc root to my local as well, but things don't seem to work. My homepage is there fine, but links beyond it don't work and my admin section /user/login seems unavailable.

So what's the correct way of going about this anyway?

Comments

litwol’s picture

make sure that you have .htaccess file downloaded as well.

that file will be hidden on non windows servers, so if you just select all files in the document root and copy over to your local machine you are surely to miss that one file.

copy it over and things should start working again.

Sometimes something interesting appears on http://litwol.com

dugawug’s picture

thanks, but i do have the htaccess files (doc root and others) on my dev box. so that doesn't seem to be it. :(

bestknight’s picture

Have you checked the above 2 settings in .htaccess and settings.php respectively? Also try to empty all the cache tables and the sessions table from the database.

dasithds’s picture

the problem is with clean urls... disable it via the db.... unless you have mod_rewrite enabled you cant use it...

http://www.mytechdaily.com

dugawug’s picture

well, i have enabled mod_rewrite locally and still no luck. i'll try to disable clean URL's instead though would prefer to keep them even for my dev box.

dugawug’s picture

also, i'm finding i can't access directly w/o clean urls, like: http://localhost/node/3
i'm getting 404 not found errors for either way.

dasithds’s picture

try accessing like this....http://localhost/?q=admin/settings/clean-urls and disable clean urls...

the way you accessed your node is wrong its like this....http://localhost/?q=node/3

http://www.mytechdaily.com

dugawug’s picture

well, every URL i access like that re-directs me to my homepage. any idea why that would be?

gpk’s picture

The question in my mind is ... is this a problem with your particular production site or is the problem that at the moment you aren't configured correctly to run Drupal.

So.. what happens if you try a clean install of the same version of Drupal?

gpk
----
www.alexoria.co.uk

dugawug’s picture

My production site doesn't have this problem. This is only on my dev box now that i've copied down the files and data (as well as freshly installed Apache, upgraded PHP & Mysql all to match production versions). I'm guessing I'm still missing some configuration somewhere.

So this is where I'm at now, does it provide a clue to anyone? (It doesn't me! ;)

1. Homepage (http://localhost/index.php) works fine.

2. Clean URLs past homepage (ie http://localhost/example-page) all go to 404 not found.

3. URLs hit via node (ie http://localhost/?q=node/3) all redirect back to my splash page which Apache has set as http://localhost/index.html

I feel like I'm close. Php is definitely installed ok, my database seems to connect fine. Apache or PHP may be missing some configuration settings though. Ack!! ;)

gpk’s picture

Sorry, I'll rephrase my question ... can you run a clean Drupal install happliy on your dev box or is it just the "downloaded" site that has the problem?

Also the homepage should work as just http://localhost/

3. suggests that index.php is not being used as the default handler. 2. suggests mod_rewrite is not working. Together they suggest that you need to enable the AllowOverrides All directive in httpd.conf or wherever. (This allows .htaccess files to be used.) There's more info on this elsewhere on this site.

gpk
----
www.alexoria.co.uk

dugawug’s picture

gpk, thanks, i did end up getting it solved and though i was working like a tornado, i believe it was the mod_rewrite not working like you pointed out. once it was, i think it was fully solved.

thank god, i never realized how tough a successfully configured WAMP setup could be. a whole day and a half of work! now to work on that Ghost image ;)