MCrypt extension required to run Craft CMS

I’m getting the following error on

Can’t run Craft CMS :(

Your server doesn’t meet the following requirements to run Craft CMS:

    The Mcrypt extension is required.

Please talk to your host/IT department about upgrading your server.

I was on PHP 7.3, have upgraded to PHP 7.4, but still getting the same error.

How do I fix this?

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.

Hi there @drr1000,

You would need to manually install MCrypt using pecl. To install pecl you need to install the PHP Extension and Application Repository or PEAR for short:

  1. sudo apt install php-pear

You might also have to install the PHP Dev tools:

  1. sudo apt install php-dev

Then we would want to go ahead and install this package here. To do that, just run:

  1. sudo pecl install mcrypt-1.0.3

Finally, make sure that you enable the new PHP extension by adding the following line to your php.ini:

If you are running PHP FPM make sure to restart it after the change to your php.ini file.

Hope that this helps. Regards, Bobby