How to Upgrade PHP 5.3 to 5.5.9 on Ubuntu 12.04 to Support Drupal 8

| Drupal Website Development | 22 seen

That day finally have come and I've officially started a new project on my first Drupal 8 website. While my first attempts were about two years ago, but due to the lack of time and will to explore new things and configure new servers I proceeded just tonight (after a conversation with a long time customer we agreed to make a re-branded website and I was allowed to "experiment" with a Drupal 8 site)

I took me some time to get it running as I wasn't prepared for the Drupal 8 requirements, and one of them, is to run on at least PHP 5.5.

I have two linodes configured - one for this blog only and second for all the other websites. Both boxes are configured on Ubuntu 12.04, which is shipped with the php 5.3 version, and of course Nginx. They run smooth for Drupal 7, but speaking for Drupal 8 it took me about an hour to get things right. I got too many 502 bad gateway and 500 internal errors, while I found this great article: Upgrading PHP to 5.4 on Ubuntu 12.04 LTS to support Drupal 8.

The idea is to keep Ubuntu 12.04 (for a while), but upgrade php version only

Optional: The add-apt-repository command is not necessarily installed in 12.04, in which case you get "add-apt-repository: command not found". to fix this:

sudo apt-get install python-software-properties

for PHP 5.5.x run:

sudo add-apt-repository ppa:ondrej/php5

​And then update your packages:

sudo apt-get update

sudo apt-get upgrade

Update the packages, but not update the Ubuntu release

sudo apt-get dist-upgrade

​Again, 502 bad gateway problems

After this upgrade I got all my other Drupal 7 sites 502 bad gateway notice, to fix this I had to edit /etc/php5/fpm/pool.d/www.conf and change /var/run/php5-fpm.sock back to 127.0.0.1:9000 (see my default Drupal + Nginx server block config. I had to follow another great tutorial on how to Fix “502 Bad Gateway” error on NGINX server after upgrading PHP

Of course you may never forget to restart the NGINX and PHP5-FPM services! You would be surprised how many people forget this step. It is necessary to do this so that the updated configuration files are loaded.

sudo service php5-fpm restart

sudo service nginx restart

Hopefully this article/draft helped you solve issue similar I got tonight. Check out other server config tutorials or see some cool tips on Drupal development.

 

Receive weekly trade ideas and portfolio adjustments directly to your inbox.

I share ongoing portfolio progress with a focus on generating income through covered calls on quality stocks. Each update includes positioning changes, trade rationale, and forward-looking adjustments based on current market conditions.

Latest articles

RWA Tokenization in Georgia: Key Takeaways from DGFI & Forbes Conference in Tbilisi

On April 24, 2026, DGFI, in collaboration with Forbes Georgia, hosted a conference on Real-World Asset (RWA) tokenization at the Radisson Blu Iveria Hotel in Tbilisi. The event brought together representatives from financial institutions, regulators, brokerage houses, and emerging fintech players to discuss the evolving landscape of tokenized…

Living in Georgia |

Building a Frame House in Latvia: Kitchen Installation, Ground Tilling & IKEA Trip

As usual, we planned our spring around the school break at BIST (British International School of Tbilisi). This year we again split the time — one week in Latvia working on the frame house in the west, and the other in Berlin for business meetings related to the translation company.Returning after winter always comes with surprises. This year didn…

Frame house - Capšu Zeme |