phpMyAdmin mycrypt issue

I just got started with DigitalOcean yesterday, my first VPN so apologies in advance for any unnecessary questions.

I have been able to install dependencies for NodeBB and also install NodeBB itself. But now I’m also trying to setup for WordPress on the same droplet

I have successfully carried out the LEMP installation through help articles, but I’m getting stuck at phpMyAdmin installation. Biggest issue now is with the mcrypt service, I can’t get it to start

Based on this tutorial,

Everytime I try to run this code ‘sudo php5enmod mcrypt’ I get an error saying php5enmod can’t be found. I know that I’m currently running php7 so I thought that was the problem.

However I’ve gone round this for about 14hrs and I still can’t figure it out

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

  1. The mcrypt.ini file in /etc/php5/conf.d needs to be copied or symlinked to /etc/php5/mods-available:

cd /etc/php5/mods-available sudo ln -s …/conf.d/mcrypt.ini . 2) Activate the module with sudo php5enmod mcrypt.

  1. Restart your web server: If using Apache, it’s like this: sudo /etc/init.d/apache2 restart

Then log into the PMA, the issue will be fixed.


When you install a package, where the package is installed depends on the package maintainer. You can install a package while inside of any directory, though that doesn’t mean the package will install there.

If you installed phpMyAdmin using the PPA you’ve noted, then phpMyAdmin is located here:


The phpMyAdmin packages don’t auto-configure NGINX by default (as only Apache & Lighttpd are on the list that includes default configurations), so you’d need to setup a location block inside the current server block for your domain to handle requests for phpMyAdmin.

Something such as:

location /phpmyadmin {
    root /usr/share/phpmyadmin;

    try_files $uri $uri/ =404;

You would then need to reload NGINX for the changes to take.

systemctl reload nginx


service nginx reload


The guide you’re working from is for Ubuntu 14.04. While the basics from the guide will work just fine, with the latest release of PHP, there’s no need to run a command to enable PHP modules as they are enabled during package installation.

The php5enmod is specific to PHP 5.x and wouldn’t apply in your case (and it won’t be on your Droplet).

To confirm whether or not mcrypt is enabled, simply create a PHP info page and do a search on the page for mcrypt.

<?php phpinfo(); ?>