Hello,
I observe many issues on our Magento on line web site.
So I want to have a mirror copy on my own.
Installed on my LINUX computer:
- mysql, php7, and all need to run a web site.
What I've done:
But still: my 127.0.0.1 web site flashes a local page and already shows the online website.
I cleaned the browser history, cookies and all.
I tried an other browser.
Always the same : If I work offline, I get an error message from browser "Unreachable website"; if I work online, the website shown is the online one.
What did I miss ?
Thanks.
Solved! Go to Solution.
Hello @patrickafr2bd5
Please change store config base url in core_config_data table
web/unsecure/base_url
web/secure/base_url
You have to change these two path values to your local path.
update core_config_data set value = 'http://local.com/' where path = 'web/unsecure/base_url'; update core_config_data set value = 'https://local.com/' where path = 'web/secure/base_url';
Run below command too:
php bin/magento c:f
Clear browser and magento cache and try again! It will work.
The real solution was:
php bin/magento cache:flush find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; find ./pub/media -type d -exec chmod 777 {} \; find ./pub/static -type d -exec chmod 777 {} \; chmod 777 ./app/etcchmod 644 ./app/etc/*.xml chown -R :<web server group> . chmod u+x bin/magento
Thanks to Manish
Hello @patrickafr2bd5
Please change store config base url in core_config_data table
web/unsecure/base_url
web/secure/base_url
You have to change these two path values to your local path.
update core_config_data set value = 'http://local.com/' where path = 'web/unsecure/base_url'; update core_config_data set value = 'https://local.com/' where path = 'web/secure/base_url';
Run below command too:
php bin/magento c:f
Nice, thanks.
It's on its way to work.
It didn't know about the command.
Running the command php bin/magento c:f
I get the following error message:
An abstract factory could not create an instance of magentosetupmvcbootstrapinitparamlistener ( alias: Magento\Setup\Mvc\Bootstrap\InitParamListener ).
You have any idea what's about ?
On my local server, all files and directories belong to www-data:www-data ( which are the server id and group ) and have 770 as access rights.
I can find three directories which have Mvc sub-directories:
- setup/src/Magento/Setup/Mvc
- magento/magento2-base/setup/src/Magento/Setup/Mvc
- vendor/magento/magento-2-base/setup/src/Magento/Setup/Mvc
All three of them have a InitParamLlistenerTest.php file
but no one had the InitParamListener.php file.
I copied files.
No better results, still the same sentence:
An abstract factory could not create an instance of magentosetupmvcbootstrapinitparamlistener ( alias: Magento\Setup\Mvc\Bootstrap\InitParamListener ).
Thanks.
Hello @patrickafr2bd5
I have shared mysql queries to change yoru website base url, which taking you to live server.
Please run those in Database and gave proper permission required:
chmod -R 0777 var/ pub/ generated/
Hello again, thanks for tips.
core_data_config has been modified to fit to my localhost 127.0.0.1
rights ( chmod and chown ) have been modified also.
Clear browser and magento cache and try again! It will work.
The real solution was:
php bin/magento cache:flush find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; find ./pub/media -type d -exec chmod 777 {} \; find ./pub/static -type d -exec chmod 777 {} \; chmod 777 ./app/etcchmod 644 ./app/etc/*.xml chown -R :<web server group> . chmod u+x bin/magento
Thanks to Manish
Good to hear! Pleasure to help you. Please let us know if you need any help.
Cheers!!