Monthly Archives: November 2015

How to Fix WordPress Automatic Updates

I've struggled with WordPress automatic updates not working several times being a web developer and WordPress expert, so I figured it is time to document one of the most successful and unknown solutions to this problem.

The reason is usually permissions related and unfortunately, that's all a lot of help sites and WordPress related blogs will tell you. Well, what's that mean? I'll dive into it a bit further and give you an actual solution that worked for me more than once!

How to fix WordPress Permissions Issues

First you Login to your server box using ssh. I like to use a little program known as Putty to accomplish this. If you don't have Putty, a simple Google search will take you right to the download page. It is a very small program so no worries. Login to your server's command prompt however you wish though and type this:

ps aux | grep 'apache'

if you copy and paste, make sure the single quotes come out okay as sometimes they don't. However, I've fixed the issue in WordPress that uses fancy quotes so you shouldn't have that problem on my blog, but it's good to know that when copy and pasting from anywhere. After you type ps aux | grep 'apache' you should get a repsponse something similar to:

root      1182  0.0  0.0 103244   832 pts/0    S+   20:16   0:00 grep apache
apache    9529  0.0  3.7 559900 147600 ?       S    11:32   0:17 /usr/sbin/httpd
apache   18218  0.0  3.0 532892 121648 ?       S    Nov22   1:30 /usr/sbin/httpd
apache   18519  0.2  3.6 557696 146616 ?       S    Nov22   6:22 /usr/sbin/httpd
apache   12520  0.0  3.0 532912 121860 ?       S    Nov22   1:28 /usr/sbin/httpd
apache   18521  0.0  3.6 557276 145804 ?       S    Nov22   1:33 /usr/sbin/httpd
apache   18523  0.1  2.8 525748 114676 ?       S    Nov22   4:13 /usr/sbin/httpd
apache   18524  0.0  2.7 522360 111176 ?       S    Nov22   1:35 /usr/sbin/httpd
apache   18525  0.0  3.3 543872 132776 ?       S    Nov22   1:29 /usr/sbin/httpd
apache   18929  0.1  3.3 542832 131656 ?       S    Nov22   3:41 /usr/sbin/httpd
apache   18931  0.0  3.8 562724 151596 ?       S    Nov22   1:43 /usr/sbin/httpd

...

You want to go with the user name listed after the first line because your first line will read root user probably. the username is the first word on the line. In this case the user named is "apache" and your user could be different so go by what your command line interface gives you on the second line and the ones after that.

Now that we know the user controlling WordPress, we need to ensure that it has complete and proper control over WordPress by changing all users in the root directory of WordPress to that same user which in this case was apache. Use this command to do so from your command prompt on your server:

chown -hR apache:apache path/to/wordpress

Simply change "apache" with the user you discovered using the previous command described above and "path/to/wordpress" to the correct path. Then this should change all your wordpress directory files and folders over to the proper user.