Hello
My temporary domain is:
https://www.mariostoparopoulos.com
and I use Plesk Panel on CentOS
I am trying to migrate a Magento 2.2 website
Here's the steps I have done so far:
1) Backed up my files & database from my old domain
2) Transferred them
3) Configured hosting
The problems I am facing:
- A lot of 500 & 404 errors
Here's what I have done so far:
I have read the official docs and read a couple of forums,
I logged to my server with root (it's the only way to log in, unfortunately) and I have created the following script:
#!/bin/bash
info='\033[0;35m'
text='\033[0;33m'
echo -e "${info}Removing Cache files"
rm -rf var/cache/ var/session/ var/report/ var/log
echo "Removal complete"
echo -e "${info}=========================================="
echo
echo -e "${info}Running Magento Commands"
echo -e "${text}- running: chmod u+x bin/magento"
chmod u+x -v bin/magento
echo -e "${text}- running: cleaning cache"
/opt/plesk/php/7.1/bin/php bin/magento cache:clean
/opt/plesk/php/7.1/bin/php bin/magento cache:flush
echo -e "${text}- running: deploying"
/opt/plesk/php/7.1/bin/php -dmemory_limit=5G bin/magento setup:static-content:deploy en_US el_GR -f -s standard --language en_US --language el_GR
echo -e "${text}- running: setup:upgrade"
/opt/plesk/php/7.1/bin/php bin/magento setup:upgrade
echo -e "${text}- running: setup:db-data:upgrade"
/opt/plesk/php/7.1/bin/php bin/magento setup:db-data:upgrade
echo -e "${text}- running: setup:db-schema:upgrade"
/opt/plesk/php/7.1/bin/php bin/magento setup:db-schema:upgrade
echo -e "${text}- running: indexer:reindex"
/opt/plesk/php/7.1/bin/php bin/magento indexer:reindex
echo -e "${text}- resizing: images"
/opt/plesk/php/7.1/bin/php -dmemory_limit=5G bin/magento catalog:images:resize
echo -e "${text}Finished Running Magento Commands"
echo -e "${info}=========================================="
echo
echo -e "${info}Changing Permissions for:"
echo -e "${text}- Files"
find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {}} +
echo -e "${text}- Folders"
find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+ {} +
echo -e "${text}Finished Changing Permissions"
echo -e "${info}=========================================="
echo
# region change ownership for web user
echo -e "${info}Changing Ownership to $user:$group"
chown -R $user:$group ./*
echo -e "${text}Finished Changing Ownership"
echo -e "${info}=========================================="
echo
# endregion Chown FilesAs you can see I am:
- cleaning the cache
- reindexing
- upgrading the database
- resizing the images
- changed permissions to 644 for files and 755 for folders
- changed ownership of files to original user
What else should I do?
Did you configure the new server with the same environment as the old server or is it totally different?
Did you check the logs under the var directory for the errors?
Unfortunately, I don't know anything about the older environment
All I can do is login to Plesk panel and see Apache errors
and sometimes I get 504 gateway time out errors,
Did you setup the new server from scratch? Is it running Plesk as well?
As for the errors, I mean checking the logs in the /var directory of your Magento installation which should show you the detailed errors your store is having and that should at least point you in the right direction.