Wordpress Error

Posted February 18, 2013 7.8k views
Hello, I have a droplet setup correctly running wordpress with Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 12.10 X64 Server. I got the following error in wordpress. Warning: fopen( to open stream: HTTP request failed! in /var/www/ on line 921 Is this cron job related? If so how do i setup a cron job for wordpress, does it need one?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
it looks like wordpress has its own internal cron job but it's unable to access that file. Have you tried to access the HTTP url manually to see what error word press is getting?
Thanks dave,

Yes you are correct. I added permissions to the wordpress directory to allow my ftp user to edit files in filezilla but that changed my permissions i had previously set for wordpress.

The solution:
sudo chown -R www-data:www-data /var/www/

For reference, WordPress has it's own internal CRON system which is fired off when visitors access your site. This is how scheduled posts are regulated. The same applies to [insert item] if it's on a schedule (i.e. backups, etc).

Normally when you see "doing_wp_cron" in the URL or error log, it's due to the internal CRON being unable to run, or, you've disabled the internal CRON in favor of an external (i.e. crontab -e or through your control panel GUI).

The downside, the internal CRON is fired off for each visitor, which can stress a server on larger sites. Just an FYI, if you're running a large installation with quite a few visitors hitting the site at all hours of the day, an external CRON run may be better. That just from experience working with sites that continually see hundreds of thousands of [unique] visitors a month. On smaller installations it's fine and really won't do much harm, especially if you have your own VPS.
Thank you Jonathan. I will have to setup an external CRON.