How to use mbstring on Heroku (PHP)
I recently wanted to use the mbstring extension on Heroku default PHP buildpack, and was unable to find a simple working solution. There were lots of buildpacks which offered mbstring support, but I found a much cleaner solution:
Add the following line in your composer.json
:
"require": {
"ext-mbstring": "*"
}
And heroku will automatically add the mbstring extension to your app on the next deploy.
Written by Nemo
Related protips
3 Responses
Thank you man, I've looking for a solution too. This is so helpful!
thanks !
this has been so difficult to figure out because it works fine on local development using Mamp. The wordpress-heroku template didn't include a composer.json file so I wasn't sure this would work. I read seriously 50 different ideas of what could be the problem, nothing was working. This is the correct answer for anyone having an issue with visual composer with their theme of choice. mine being the ken theme. Thank you!