-2

I want to update my server with CentOS 6 with PHP 5.5.38 to PHP 7 because few plugins of wordpress doesn't work very well. I'm new updating these type of systems and I don't know if it's only remove the old version and install a new one or I need to follow specific steps.

Thank you in advance!

  • 1
    Put your title into a Google search and get 50,300 suggestions. Do we need another? – RiggsFolly Oct 15 '18 at 14:30
  • 1
    Welcome, to improve your experience on SO please read how to ask an [On Topic question](https://stackoverflow.com/help/on-topic), and the [Question Check list](https://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist) and [the perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) and how to create a [Minimal, Complete and Verifiable Example](http://stackoverflow.com/help/mcve) and [TAKE THE TOUR](http://stackoverflow.com/tour) – RiggsFolly Oct 15 '18 at 14:31

1 Answers1

0

You can remove using:

yum remove php*

You will need to install the remi repo for Centos 6:

yum install -y https://rpms.remirepo.net/enterprise/remi-release-6.rpm

And later install php7 as follow:

dnf install -y --skip-broken --allowerasing --nogpgcheck \
            php71-php-bcmath \
            php71-php-cli \
            php71-php-common \
            php71-php-fpm \
            php71-php-gd \
            php71-php-imap \
            php71-php-intl \
            php71-php-ldap \
            php71-php-mbstring \
            php71-php-mcrypt \
            php71-php-mysqlnd \
            php71-php-pdo \
            php71-php-pear \
            php71-php-json \
            php71-php-pecl-apcu \
            php71-php-pecl-geoip \
            php71-php-pecl-igbinary \
            php71-php-pecl-imagick \
            php71-php-pecl-jsond \
            php71-php-pecl-memcache \
            php71-php-pecl-redis \
            php71-php-pecl-xdebug \
            php71-php-pecl-zip \
            php71-php-pgsql \
            php71-php-phpiredis \
            php71-php-process \
            php71-php-pspell \
            php71-php-soap \
            php71-php-xml \
            php71-php-xmlrpc \
            php71-runtime

ln -s /etc/opt/remi/php71/php.d /etc/php71.d
ln -s /etc/opt/remi/php71/php.ini /etc/php71.ini

ln -s /etc/opt/remi/php71/php-fpm.conf /etc/php71-fpm.conf
ln -s /etc/opt/remi/php71/php-fpm.d /etc/php71-fpm.d

Hope this help you.

Gabriel Pereira
  • 160
  • 1
  • 10