deyqua
Last Updated: February 25, 2016
·
5.083K
· captn3m0
90871c43d335468e83876ac0d0a9b40c

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.

Say Thanks
Respond

3 Responses
Add your response

16110
Wobf8txr normal

Thank you man, I've looking for a solution too. This is so helpful!

over 1 year ago ·
20106
3a8fad7264f977f820feea58bdd9775b

thanks !

over 1 year ago ·
22656
Gh7ouvhh normal

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!

over 1 year ago ·