I have just moved a WordPress install from a remote host to run on my local development machine. On the remote server it’s fully functional.
However, on my development box I can only load the homepage. Other URLs just load a standard phpinfo()
page with no errors.
Does anyone know what might be causing this?
It sounds like you are using MAMP or WAMP on your dev box, which will load a default vhost showing phpinfo for any page that does not exist.
Inside wordpress, the settings, in the DB, it sounds like you have Url’s “hardcoded” like “http://www.mysite.com” which are not working locally because your “dev” Url is something like “http://localhost”
Whenever using a development server, especially with wordpress, you should setup you dev server as close to your production server. This means you should edit your host file to make it so “http://www.mysite.com” actually goes to your development box or localhost. That way you are viewing everything as it will be when it goes to production.
I had this problem as well following the hosting company re-installing an SSL certificate.
I did some searching and really only found this thread which give me the idea there was a 404 error hiding there somewhere so I checked the php_errors.log file (which I found in the root folder of my site in FTP) – opened that in notepad and found many errors such as:
PHP Fatal error: Class ‘WordPressHTTPS_Module_phpinfo’ not found in /var/www/vhosts/mywebsite.com.au/httpdocs/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php on line 385
So – indeed a missing file in the wordpress-https plugin.
To correct, I renamed the folder which contained that plugin (eg wp-content/plugins/wordpress-https to wp-content/plugins/wordpress-https-disabled) – effectively disabling the plugin.
This then allowed me to login to the wordpress admin, install the latest version of that plugin – which worked fine and then deleted the old folder (wordpress-https-disabled)
Everyting was good as gold after that
Hope that helps someone 🙂
open httpd.conf in text editor
Change;
AllowOveride none
AllowOveride All
I had the same challenge when I cloned my remote site locally.
I fixed it by checking the .htaccess file and correcting this line to point to the right project folder: