Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

mydomain is the main domain (in Plesk, Media Temple MT VPS), and under that are several Wordpress sites, like mysite1.com, mysite2.com, etc.

Problem is that I get lots of these errors in httpd's error_log:

[error] [client 127.0.0.1] script '/var/www/html/wp-cron.php' not found or unable to stat

wp-cron.php does exist at the html root in all the Wordpress installs.

I've found hints elsewhere that these errors may have something to do with my /etc/hosts file. This is the hosts file:

127.0.0.1 mydomain.com mydomain localhost localhost.localdomain

Question: do I need to add mysite1.com, mysite2.com, etc., to the hosts file so they resolve and can find the wp-cron.php file?

Edit: found the answer after much Googling. Seems that there are two issues: the hosts file and the fact that MT VPS overwrite the hosts file on each reboot. So the hosts file should look like this for multiple domains on one server:

127.0.0.1 localhost localhost.localdomain
xxx.xxx.xxx.xxx  yourdomain1.com yourdomain1 yourdomain2.com yourdomain2

And those lines must have a few blank lines above the in the hosts file, or they will get overwritten each reboot. See http://bradt.ca/archives/fix-wordpress-missed-schedule-error-on-media-temple-dv-plesk/

share|improve this question

2 Answers 2

How do you have the script set up under Plesk? If you are trying to do a wget or such, you don't want the /var/www/html. If you are running the script as a user in a shell, does the script have appropriate permissions to run as that user?

share|improve this answer
up vote 0 down vote accepted

Found the answer after much Googling. See edit above.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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