While configuring magento for the first time. When I try to set my base url to http://localhost it gives me an error.
Simply replace the Base URL with this :
Another solution is to add a line in your hosts file (
/private/etc/hosts for OSX users,
/etc/hosts for Unix/Linux users) such as:
and then to use the corresponding URL while installation:
Base URL =
http://127.0.0.1 instead of
The following method will also work: http://www.templatemonster.com/help/avoid-installation-base-url-verification-error-on-localhost.html
The easiest way to avoid the verification error is to change the Base URL field class.
- Open the browser development tool (for example Firebug for Mozilla Firefox)
- Select the Base URL field
You can see the field class is
class=”required-entry validate-url input-text”
- Remove from html the
validate-urlclass. As a result you should have:
- Press Continue button at the bottom of the page to proceed to the next installation step.
You should setup a vhost for your Magento shop like fschmengler said. If you are using Apache simply create a vhost entry, e.g.:
<VirtualHost *:80> ServerName magento.local DocumentRoot "/your/path/to/magento/root" <Directory "/your/path/to/magento/root"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Then, make sure that your local DNS entry for "magento.local" resolves to your local machine by adding editing your hosts file.
Finally, set your base url to magento.local and you are good to go.
So I got the last suggestion to work in Firefox and I never got to the part about
Remove "validate-url" from the list of classes
But it took some steps not mentioned here most likely because I am dealing with a backup from my old InMotionHosting.com VPS. I am Using Ubuntu 14.04.4 LAMP for my localhost/server. (I had setup, on another server Ubuntu version '16.xx' but it was not ready for prime time yet! Maybe that was because I do not like doing everything in the CLI, so I installed a "Ubuntu-GNOME" desktop), I mean what the hey it has 8 AMD Opteron cores and 32 Gig of RAM!
So Not necessarily in order, Clear the Magento cache and sessions in the /var folder/directory. Make sure to check ownership and group, most group settings should be
www-data allowing Magento to manipulate files. There is conflicting info about permissions; some say
775 and others say
755, I can never assume what is right but I know one setting will not let the Magento down-loader work. My session are set to the database in:
So my /sessions folder/directory is always empty, thus you may need to truncate the sessions in you database? You don't need to know SQL to do this in phpmyadmin.php, just do a search in the box in the top left with the red X for session, then selecte core_session click operations tab and find "Empty the table (TRUNCATE)", Do Not Delete the table. Don't forget to change the
core_config_data - 'PATH' [web/unsecure/base_url] and [web/secure/base_url]
Table to something like
http://magento.localhost/ or https://magento.localhost/
I just deleted the cookies value in that table for now as I am just doing some exports!
Hope this helps!