I am trying to create an exact mirror of a Magento production server on my local server for further development, but I have run into a few issues.
On the production server, our Magento is configured to run without displaying the index.php
, but after attempting a migration to my local server, the index.php
is required to access any links. Additionally, when I select a category to visit (for example), I am directed to http://localhost/category.html
instead of http://localhost/my-magento-store.com/index.php/category.html
The other issue I've noticed is that I am unable to log in to the admin section. After entering the correct login credentials, I am redirected to the login screen again without any error messages.
I am running a MAMP stack on the local server, and here is what I have done:
- Created a tar of the entire production server
- Created a database backup in Magento
System > Tools > Backups
- Downloaded and extracted tar into local directory
- Imported database dump into local MySQL using Alexey Ozerov's big dump script. (The .sql file is 1.3m lines)
- Changed values of
web/unsecure/base_url
andweb/secure/base_url
incore_config_data
table. (As I don't have a self-signed SSL cert, I puthttp://localhost:8888/my-magento-store/
for both values) - Dumped contents of
var/cache
andvar/sesson
- Changed permissions to 755 for all files on local dev server
- Navigated to
http://localhost:8888/my-magento-store/
but got the "Index of /" page instead. - Navigated to
http://localhost:8888/my-magento-store/index.php
and got an error. - Followed these steps to solve the error, reloaded the page, and the home page loaded correctly.
Any ideas?
URL Rewriting depends on your .htaccess file, so there are a couple of things to check:
web/seo/use_rewrites
incore_config_data
should betrue
..
files in the root directory especially.htaccess
? If you usedtar -cvf archive.tar *
then it may have missed them. (Nice "feature" of *nix).httpd.conf
hasAllowOverride All
, otherwise your local.htaccess
will be ignored.HTH, JD