简体   繁体   中英

Magento store blank screen after domain change

After attempting to change the domain for a Magento Store (Ver 1.4.1.1), I am presented with a blank screen on the frontend. The site has not been moved, only a domain change.

On the backend (admin panel), it does allow me to login, however, once in the panel, all i get is the upper header with the menu options and the footer. However, even after clicking through the admin options loads. The content area is absolutely blank.

There has been no error reports thus far, and after going through several forums these have been my unsuccessful attempts at solving the issue:

1. ...Checked the local.xml file for the db connection.

2. ...In the DB, under core_config_data i have pointed the new domain for secure and unsecure

3. ...Increased memory size in the.htaccess

4. ...I've enabled php error logging in the .htaccess like so:

    php_flag  log_errors on
    php_value error_log  /home/path/public_html/domain/PHP_errors.log

And the error output was a 500 Internal Server Error

5. ..In index.php I have changed this line

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

to this one

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '1';

and that also did nothing.

6. ...Cleared cache under var from var/tmp and var/session .

Any help on what may be causing this issue would be much appreciated.

You will need to update your stores domain name in the database.

Look at the table:

core_config_data

You should look for rows with path:

path = web/unsecure/base_url
path = web/secure/base_url

Update them to the new domain name, and then refresh your Magento cache, you can empty the /var/cache and /var/session directories.

Remember to include a training slash on your URL:

http://www.newdomain.com/

strong text

First Open “Validator.php” file located as the following path. vendor\magento\framework\View\Element\Template\File\Validator.php

find the function:

protected function isPathInDirectories($path, $directories)

Now inside this function find this line of code.

$realPath = $this->fileDriver->getRealPath($path);

And replace this line of code with the below code.

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Now compile your Magento by using commands:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM