Fixing Ubuntu PHP Issue

After Upgrading my apache2 Webserver from Ubuntu 14.04 to 16.04.4 I took notice that my wordpress installation didn’t work anymore. Seems that the error that the php version got upgraded from 5.6 to 7.0 and something isn’t compatible anymore.

With help of the following steps I was able to get my wordpress working again ūüôā

#1. Install aptitude if it is not already installed using
sudo apt-get install aptitude
#2. Removed php7 and unwanted php using
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
#3. Added old repo using
sudo add-apt-repository ppa:ondrej/php
#4. Updated repo
sudo apt-get update
#5. Installed php5.6
sudo apt-get install php5.6
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-curl php5.6-gd php5.6-zip
#6. Checked php version
sudo php -v
#7. Enabled mod_php
sudo a2enmod php5
Ignored error message
#8. Opened php5.6 conf
sudo nano /etc/apache2/mods-enabled/php5.6.conf
#9. Commented following lines
<IfModule mod_userdir.c>
   <Directory /home/*/public_html>
      php_admin_flag engine Off
    </Directory>
</IfModule>
#10. Restarted the server
sudo service apache2 restart 

Ersten Kommentar schreiben

Antworten

Deine E-Mail-Adresse wird nicht veröffentlicht.


*