I am trying to install Magento 2.2.2 on my local Windows environment with WAMP. But it gives me a 500 Internal Server Error. When I replace the previous version of htaccess file it does work. Would that be the issue?

Rewrite engine is on and the module is loaded.

Error log:

Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration

I have tried to enable LoadModule version_module modules/mod_version.so to make it work but now when the installation runs, in between it responds in my console that it's false after a few seconds. When I try to refresh, it starts the remaining installation but I have to refresh several times to complete the installation. I don't know if Magento is installed successfully or not during this process.

When I go to the admin it works, but I get console JS errors. The front-end still loads without CSS.

I tried to install it several times but every time I wind up with this error

  • Could you please share the htaccess file as well as the log-file that details the error? Jan 7, 2018 at 12:22

4 Answers 4


Ok Finally.... here is the process i did follow to get rid from this.

Step1:: Please make sure that LoadModule version_module modules/mod_version.so is loaded from httpd.conf file to resolve Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration error.


Please make sure that below variable value should be set as

max_execution_time = 1800
max_input_time = 1800
memory_limit = 1024M


Creat virtual host.

add below code in your file path :: D:\wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf

Path may vary as per your installation

<VirtualHost *:80>
ServerName demomage222
ServerAlias www.demomage222.com
DocumentRoot D:/wamp64/www/mage222
<Directory  "/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local

Make entry in host file like below. host file path for me(may different for you) :: C:\Windows\System32\drivers\etc\hosts www.demomage222.com
  • +1 for your post , its help me to resolve the issue !! special Loadmodule mod_version.so needs to be enabled !! Thank you once again Mar 20, 2018 at 6:27
  • It works for me Jul 8, 2020 at 11:02

I was also facing the same issue when i was installing Magento 2.2 on WAMP. I changed the PHP version to PHP 7.1 and then restarted the installation. Things worked for me.


Locate Options +FollowSymLinks in .htaccess of your Magento root and change it to: Options +SymLinksIfOwnerMatch

Do that for /pub/static/.htaccess and /pub/media/.htaccess as well.


The described error points to mod_version not being enabled.

To enable it go to http.conf in the conf folder and find a line that has mod_version in it.

Remove "#" from the beginning to uncomment it.

Then restart apache.

  • changed but nothing happen Jan 7, 2018 at 12:32
  • You should check the php error log then and post it's contents. It should be located here: ...\wamp\logs\error.log
    – Lez
    Jan 7, 2018 at 12:55
  • it gives error in log like Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration Jan 7, 2018 at 13:04

If you are facing it while installation it could be A Permissions Error.

In most cases, a 500 Internal Server Error is due to an incorrect permission on one or more files or folders. set folder permission to 0775

sudo chmod -R 775 /path_to_magent/Folder
  • Doesnt apply here as windows Jul 28, 2019 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.