Skip to content Skip to sidebar Skip to footer

Welche PHP-Module braucht WordPress

Rate this post

Für den optimalen Betrieb von WordPress (aktuell Version 5.4) braucht WordPress einen ganzen Satz an PHP-Module. Was du auf einem Ubuntu-Server installieren musst, um all diese Plugins laufen zu lassen, das beschreibe ich dir im nachfolgenden Text.

Neues APT-Repository

Ubuntu selbst hat eine ältere PHP-Version in seinen Repository-Servern. Um ein aktuelles PHP zu installieren, brauchst du ein PPA (Personal Package Archives – eine sogenannte persönliche Paket-Quelle). Ich verwende das PPA von Ondřej Surý. Dieses wird auch als das primäre Repository für PHP-Module und PECL-Module betitelt. Nun erstmal zur Einrichtung:

user@system: sudo add-apt-repository ppa:ondrej/php
user@system: sudo apt update

Das war’s es auch schon. Damit wird im Verzeichnis /etc/apt/sources.list.d/eine neue Datei angelegt ondrej-ubuntu-php-bionic.list die auf die Paket-Quelle für PHP und die notwendigen PHP-Module zeigt. Der notwendige Fingerprint wird hier gleich mit importiert.

Installation der Module

Jetzt kommen wir an den Punkt, wo die notwendigen PHP-Module installiert werden. Dazu sind nachfolgende Befehle notwendig:

user@system: sudo apt update
user@system: sudo apt install php7.4 php7.4-bcmath \
php7.4-cli php7.4-common php7.4-curl php7.4-dev \
php7.4-fpm php7.4-gd php7.4-imap php7.4-intl \
php7.4-json php7.4-mbstring php7.4-mysql \
php7.4-opcache php7.4-readline php7.4-sqlite3\
php7.4-xml php7.4-zip php7.4-xmlrpc \
php-libsodium php-imagick php-pear php-dev \
libmcrypt-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
...
Processing triggers for php7.4-cli (7.4.7-1+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for php7.4-fpm (7.4.7-1+ubuntu18.04.1+deb.sury.org+1) ...

user@system: sudo pecl install mcrypt
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading mcrypt-1.0.3.tgz ...
Starting to download mcrypt-1.0.3.tgz (33,590 bytes)
.........done: 33,590 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
libmcrypt prefix? [autodetect] : 

...

Build process completed successfully
Installing '/usr/lib/php/20190902/mcrypt.so'
install ok: channel://pecl.php.net/mcrypt-1.0.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=mcrypt.so" to php.ini

user@system: sudo touch /etc/php/7.4/mods-available/mcrypt.ini
user@system: echo "extension=mcrypt.so" > /etc/php/7.4/mods-available/mcrypt.ini
user@system: cd /etc/php/7.4/fpm/conf.d
user@system: ln -s /etc/php/7.4/mods-available/mcrypt.ini 20-mcrypt.ini
user@system: cd /etc/php/7.4/cli/conf.d
user@system: ln -s /etc/php/7.4/mods-available/mcrypt.ini 20-mcrypt.ini

Damit sind alle notwendigen Module (und ein paar Standard-Module wie sqlite3) installiert.

Überprüfung der installierten PHP-Module

Kontrollieren kannst du das mit nachfolgendem Befehl:

user@system: php7.4 -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
imap
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Wie du siehst, sind jetzt alle notwendigen PHP-Module installiert. Die Prüfung in WordPress zeigt jetzt keine Warnung mehr an.


Photo by Patrick Fore on Unsplash

Kommentare anzeigenKommentare schließen

Hinterlasse ein Kommentar

0.0/5