Is there a MSSQL support for Craft CMS? Or any plugin that can help to connect to a MSSQL database?

Thank you!


Assuming you're running Craft CMS 3, the Connect plugin will let you connect to MSSQL databases (local or remote)

You'll just need to do:

composer require yiisoft/yii2-mssql

...on your Craft CMS project. To be clear, this doesn't add support for MSSQL to Craft itself, it just lets you query MSSQL databases in your Twig templates.


Craft 3 supports MySQL 5.5+ and PostgreSQL 9.5+.

Craft 2 only supports MySQL 5.1+.

Yii (the framework Craft runs on) uses PDO for its database abstraction layer, which supports many databases, so technically it wouldn't be much work but it's more of a matter of the demand for it and "are we ready to support other databases".

Logically MSSQL would probably be next on the list, but there's not timeline/ETA for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.