1

I have migrated all of my Magento files and database to the new server. I have changed the database information in local.xml file, and changed URLs in the core config table in database.

I get many errors on site, and there is lot of content missing. When I re-uploaded the css, the styles were reloaded and I got the part of the look back.

Now when I go to my cart page, I get 404 error.

This could be related to my server configuration, as for some other sites migration some of my sub-folders are returning me an error, like the .htaccess file isn't configured.

The link is www.nuby.hr

Any ideas?

Thanks

  • Migration should be a pretty straightforward procedure with a standard Magento install, have you checked the obvious such as proper permissions and ownership of files on the new server? – Jonathan Hussey Apr 11 '13 at 9:58
2

Just repeat your migration - it has clearly gone wrong

cd /domains/example.com/http
wget sys.sonassi.com/mage-dbdump.sh
bash mage-dbdump.sh
tar cvfz ../http.tgz . --exclude=var/log --exclude=var/session --exclude=var/cache --exclude=var/*port

Then transfer that file to the new server, extract it

tar xvfz http.tgz

Edit the ./app/etc/local.xml to reflect the new DB details

Then restore the DB

bash mage-dbdump.sh --restore

There's good documented procedure that's a little more verbose than the above here.

Or automate the process

We've also got an automated script to do quick migrations (without media etc.)

wget sys.sonassi.com/mage-bundle.sh
bash mage-bundle.sh

This will dump the DB and tar up the document root (excluding tmp files, reports, errors, media, archvies, static content etc.) - for a quick migration.

This is really aimed towards doing dev/test migrations (or backups); but you can use this to get a base of the site over; then supplement the missing files with an rsync from the other machine, eg.

/usr/bin/rsync -par /domains/example.com/http/ exampleuser@111.111.111.111:/domains/example.com/http/ --delete --exclude=var/log --exclude=var/session --exclude=var/cache --exclude=var/report --exclude=app/etc/local.xml

Clean up your permissions

And always, check and clean up your permissions, replace www-data with your respective user/group

chown -R www-data:www-data/home/sonassi/public_html
find /home/sonassi/public_html -type d -exec chmod 775 {} \;
find /home/sonassi/public_html -type f -exec chmod 664 {} \;

Or again, read this for a more permanent, sophisticated solution.

  • Great script, thanks. We've been using a custom pre-commit hook to handle db dumps in the past which works as expected but did not come with the table list optimizations used in your script. – mkerstner Sep 15 '15 at 6:11
0

As I had such problems, playing with .htaccess helped.

Especially helped changing #RewriteBase /magento/ to RewriteBase / in mentioned .htaccess

Keep on mind that that there are several files on the installation.

Hope that helps ;)

  • 1
    The original problem was the files, when I recopied it, it started to work. However, I see now that the redirects are not working.. I have manually created links in header and footer.phtml to my inner pages like domainname.com/index.php/aboutus, And everytime I click on that menu items, I get redirected to the homepage. Weird.. – Josip Gvozdić Apr 11 '13 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.