Вопрос

I have a nice Magento server and need to move to other server host

Moving Magento from Php 5.2.17 server to SuPHP server

All my file permissions are bogus on new server and nothing works. What do I need to change, or what is the proper way to move Magento to a SuPHP server (from non SuPHP)

METHOD 1 -> Current process:

Old server

  1. remove session/cache/etc
  2. tar gz all + SQL dump

New server (SuPHP)

  1. untar gz + upload SQL
  2. update SQL server in local.xml
  3. update core_config in database

METHOD 2 -> Idea

  1. Re-install + upload old DB
  2. Copy only certain folders (but then I dont know how to copy over extenions etc)

What should/can I change to make Magento SUPHP work?

Это было полезно?

Решение 2

To add a log of my experience. Thanks to Fiasco Labs.

Main steps

On old server

  1. Important! Disable cache in admin, remove, clear any cache (also from extension like zoom, APC)
  2. Follow guidelines as below (create site backup in tar.gz)
  3. Execute SQL dump via prompt or via directadmin or other

On new server

  1. Place tar in public html and extract (can also be done via directadmin filemgr)
  2. upload SQL
  3. update settings in local.xml
  4. update urls in core_config in database
  5. Set chmod app/etc/local.xml 600 (no write to stop error messages in log)

# GOTO MAGENTO ROOT PUBLIC_HTML
mkdir ../backup
cp -rf * ../backup
cd ../backup

# VERIFY THAT YOU ARE IN DIRECTORY BACKUP
# REMOVE ALL CACHE RELATED FILES IN HET BACKUP FOLDER
rm -rf var/cache/* var/session/* var/zoom/* var/minifycache/* downloader/pearlib/cache/* downloader/pearlib/download/* downloader/pearlib/download/* downloader/pearlib/pear.ini var/cache/* var/backups/* var/report/* var/log/* var/locks/*

# SET FILE RIGHTS CORRECTLY FOR SUPHP
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 lib/pear
chmod 550 mage

# MAKE DIRS READABLE
chmod -R 777 var media
chmod 777 media var/cache/ var/session/ var/zoom/ var/minifycache/ downloader/pearlib/cache/ downloader/pearlib/download/ downloader/pearlib/download/ downloader/pearlib/ var/cache/ var/backups/ var/report/ var/log/ var/locks/

# TAR AND GZ
tar -czpf backup_mage.tar.gz . 

Другие советы

SuPHP file permissions expects directories to be set 755, files to be set to 644 and ownership of the files to be set to the user and group that SuPHP expects.

Usually under SuPHP, the user and group owners have the same name, replace $user with your assigned account name. The following are executed in Magento's root directory.

chown -R $user.$user *

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 pear
chmod 550 mage #for magento 1.5+

Before doing your tar file and database backup on the old system, do yourself a favor, go into Magento Admin and disable all caching and make sure the compiler is shut off.

This will save you from having certain issues on the new server till you have the baseURL settings changed and file/directory permissions properly set. AFTER you have Magento up and running properly, enable the Magento caching. Make sure everything's running, flush the cache and then (if you were using it before) recompile and only after recompile, then enable the compiler.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top