I’m working on a messy customer project.
To debug it, I would like to work on it on localhost.
I’m using Wampserver.
This is what I did :
1 – I made a virtualhost
httpd-vhosts.conf
<VirtualHost *:80>
ServerName devfoo.pro
DocumentRoot "c:/path/to/project/src/www"
<Directory "c:/path/to/project/src/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
2 – I renamed the file .htaccess
to _.htaccess
At that point when I run the page, there is still a redirection from http://devfoo.pro
to https://devfoo.pro
.
Notice : If I rename the plugin really-simple-ssl
to _really-simple-ssl
, the page redirect to the online website.
So… how can I import a WordPress project on localhost and deactivate the https protocol properly ? (Keeping the https on localhost is so messy! I never manage to simulate https on a local server with or without documentation, tutorials etc… )
2 Answers
I also had this experience with chrome and firefox, they switch http to https and did not find a way to overcome it, so i used internet explorer in that windows machine.
I don’t think you can have ssl on localhost or an ip address, i guess you know it as you used devfoo.pro. SSL certificate could be generated only for fully qualified domain names.
So, you will need to buy a certificate to have things working, out of the box. Easy and “secure”.
Or you can self sign one for your self, following a tutorial :-). Might be difficult and you will need to accept it in your browser or os.
Or better (at least for me), use this website. It will self sign a certificate for a provided domain.