Skip to content

Month: December 2015

How to fix WordPress user registration email not sending while admin notification is sent.

Today I noticed my WordPress is not sending registration email to new user, but I’m received the notification email.
I spent 2 hours to figure it out.

  • Local SMTP mail server checked, email sent without any error.
  • External SMTP mail server tried, email sent without any error.

Both sending method sent notification to admin only, but not user registration email.

I suspect the problem is not caused by mail server, then I check all  installed plugins.

Finally I found a plugin called “Stop Spammers Spam Control” cause the problem I mentioned above. By deactivating it, everything works like charm again.

Conclusion

So if you having the same problem like me, try deactivate some installed anti-spammer plugins. It might helped.

Leave a Comment

Upgrade PHP 5.5 to 7.0 on Ubuntu 14.04

PHP 7.0 just released 2 weeks ago, and it has good reviews about performance improved a lot. So I would like to give it a try, upgrading my Ubuntu 14.04 VPS on DigitalOcean to this latest PHP version.  Here is my upgrade snippet.

My VPS details before upgrade:
  • Ubuntu 14.04
  • PHP 5.5.9
  • nginx 1.4.6
  • phpmyadmin installed
Steps
  1. Add the repository
    add-apt-repository ppa:ondrej/php-7.0
  2. Update
    apt-get update
  3. You can check installed php5-* packages with this command, for better understanding before remove them.
    dpkg --get-selections | grep php
  4. Remove all php5-* packages
    apt-get purge php5-*
    apt-get --purge autoremove
  5. Install php7.0 packages. Some might not necessary, depends on your requirement.
    apt-get install php7.0-fpm php7.0-mysql php7.0-cli php7.0-common php7.0-json php7.0-opcache
  6. After everything installed properly, you will need to update your web server configuration. For me, I need to modify fastcgi_pass directive in Nginx config file to something like this:
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    

    This is because the location of socket file has changed in php7.

  7. Restart your nginx and php7.0-fpm
    service nginx restart
    service php7.0-fpm restart
Notes:
  • Run all commands with sudo or your root account.
  • phpMyAdmin will be removed during the steps above. Because it requires some php5 packages.
Leave a Comment