Config Changes

Change admin url path instead of /admin

  • Find the code in public/app/etc/local.xml
    1
    2
    3
    4
    5
    6
    7
    8
    9
          <admin>
            <routers>
                <adminhtml>
                    <args>
                        <frontName><![CDATA[admin_randomstring]]></frontName>
                    </args>
                </adminhtml>
            </routers>
         </admin>
    
  • Replace the frontName with whatever you desire
  • Flush Magento cache by going to System -> Cache Management -> Flush Magento Cache

Enabling Developer Mode

  • nano /etc/nginx/includes/php-fpm.conf
  • add line fastcgi_param MAGE_IS_DEVELOPER_MODE 1;
  • sudo bash
  • restart nginx (systemctl reload nginx.service)

Change Magento Base URLs

  1. Check first whether base_url is where we expect it to be: SELECT * FROM core_config_data WHERE path LIKE '%base_url%';
  2. Then change it to desired value: UPDATE core_config_data SET value='https://www.domain.com/' WHERE path LIKE '%base_url%';
  3. Check again whether it changed: SELECT * FROM core_config_data WHERE path LIKE '%base_url%';

Having an incorrect value here will result in not having valid sessions. This will mean empty baskets and "Invalid form key" on admin login

  1. Check first whether cookie_domain is where we expect it to be: SELECT * FROM core_config_data WHERE path LIKE '%cookie_domain%';
  2. Then change it to desired value: UPDATE core_config_data SET value='www.domain.com' WHERE path LIKE '%cookie_domain%';
  3. Check again whether it changed: SELECT * FROM core_config_data WHERE path LIKE '%cookie_domain%';

HTTPS:// Admin Page

If the changing the cookie domain didn't solve the "Invalid form key" on the admin login then check that you are attempting to log in via https.

Clear cache with magerun

=> magerun

Run from inside of container:

1
2
3
4
cd /var/www/vhosts/{clientname}/public/
wget https://files.magerun.net/n98-magerun.phar
chmod +x n98-magerun.phar
./n98-magerun.phar cache:clean