You need to put wordpress in the correct folder so apache can read the php files and serve the content to clients connecting to the url. Moreover please consider using an FQDN resolver by your interlan dns server or forcing the resolution modifying the ‘hosts’ file.
3
Answers
You need to put wordpress in the correct folder so apache can read the php files and serve the content to clients connecting to the url. Moreover please consider using an FQDN resolver by your interlan dns server or forcing the resolution modifying the ‘hosts’ file.
I was also facing the same issue while working on Magento 2.4.2. Following workaround worked for me.
Step 1: Set the root directory to ‘magento2/pub’
go to file C:xamppapacheconfextrahttpd-vhosts.conf
Paste below code at the bottom of the file.
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/magento24/pub"
ServerName yourname.magento.com
Replace with your project name.
Step 2: Update the local host domain
goto file C:WindowsSystem32driversetchosts
Paste below code at the bottom of file.
127.0.0.1 yourname.magento.com
Step 3: Update base URL in database.
UPDATE core_config_data SET value=’http://yourname.magento.com/’ WHERE path=’web/unsecure/base_url’;
Step 4: Update env.php file
goto file: app/etc/env.php
Paste below code at the bottom of the file.
‘directories’ => [
‘document_root_is_pub’ => true
]
Step 5: Enable developer mode
run below commands on cmd from your project directory.
php bin/magento deploy:mode:set developer
php bin/magento cache:flush
Also check if you have created several files on different directories as it may cause this error
make sure it’s only on the C:/xampp/htdocs/(create a new folder by the name login)/(save your file here)