Today I had to update a server running CentOS 6.4 to have PHP 5.5. This is actually easier than you may think.

Firstly I did a yum update this updated the server to version 6.5 and on to PHP. First PHP 5.5 is not in the main repositories so we need to enable the remi repo and while we are at it the epel repo.
So make sure you have wget

Then download the epel and remi repos:

Now enable the remi repo (I like to use nano, which nicer I think than vi):

Now change enabled to 1 on the [remi] and on the [remi-php55]. so those sections should look like:

To update your PHP to 5.5 you only have to do:

And that’s it you have php 5.5 to check:

Now PHP 5.5 has and OPcache build in to so to take advanage of that we do:

Now your PHP has built in cache support which will make your scripts faster.

Happy coding!

  • Zakk Wylde

    This works like a charm! I was a bit worried downloading over 200MB of variety of CentOS 6.4 packages but it went really smoothely as same as the entire process described here – from the very beginning to the very end. Thank you very much indeed!

    Now I can start to play with Slim micro framework, thanks once more again, indeed!

    • Thanks @Zakk Wylde I am glad it helped you. Enjoy Slim and happy coding