Enable PHP Module For WordPress

6 min read

Enable PHP Module For WordPress

WordPress code is created using the PHP programming language. It’s crucial to keep this language updated for both security and functionality as it runs on the server. Although there are many PHP versions that WordPress supports, some of which are even out-of-date, you should generally only use those that have security or stable support. PHP 5.6 is compatible with WordPress. 20 . Since PHP 7.2 is the only version supported, versions earlier than that are not advised.

If you have the most recent version, enter x because it only offers security support. PHP extensions are used by WordPress in many different versions, including some of the outdated PHP core. If the desired extension is absent, WordPress will either need to work harder to complete the task the module assists with or, in the worst case scenario, will remove functionality. Consequently, it is advised to use the PHP extensions listed below.

  • curl – Performs remote request operations.
  • dom – Used to validate Text Widget content material and to routinely configure IIS7+.
  • exif – Works with metadata saved in photos.
  • fileinfo – Used to detect mimetype of file uploads.
  • hash – Used for hashing, together with passwords and replace packages.
  • json – Used for communications with different servers.
  • mbstring – Used to correctly deal with UTF8 textual content.
  • mysqli – Connects to MySQL for database interactions.
  • sodium – Validates Signatures and gives securely random bytes.
  • openssl – Permits SSL-based connections to different hosts.
  • pcre – Increases efficiency of sample matching in code searches.
  • imagick – Provides higher picture high quality for media uploads. See WP_Image_Editor is incoming! for particulars. Smarter picture resizing (for smaller photos) and PDF thumbnail help, when Ghost Script can be obtainable.
  • xml – Used for XML parsing, similar to from a third-party website.
  • zip – Used for decompressing Plugins, Themes, and WordPress replace packages.

An event-driven application created in PHP is WordPress. PHP is a dynamic language that produces HTML from code that is continuously compiled. The majority of the dynamic data used by the WordPress stack comes from functions and a database. The output is sent to the web server, which then creates the finished full web page and sends it back to the requesting browser along with static assets like image files, CSS files, and JavaScript files. What Are PHP Extensions?

The core PHP programming language can expand its functionality by using extensions, similar to how WordPress can do so by installing plugins. In a folder inside the PHP installation folder, compiled libraries for PHP are installed. There is no default extension folder file or pathname; the extract folder name must be specified in the php.ini configuration file. On Linux-based installations, you can use the command line to search for the directory by typing: php -i | grep extension_dir. On other operating systems, you can look directly in the php . ini configuration file to find the extensions directory.

Related Post  WordPress Website Care Plans

How Many PHP Extensions Exist?

According to the PHP documentation ref: there are 176 officially documented PHP extensions.

  • Apache
  • APCu
  • Arrays
  • BC Math
  • Bzip2
  • Calendar
  • Classes/Objects
  • CommonMark
  • COM
  • Componere
  • CSPRNG
  • Ctype
  • CUBRID
  • cURL
  • Date/Time
  • DBA
  • dBase
  • Direct IO
  • Directories
  • DOM
  • Data Structures
  • Eio
  • Enchant
  • Error Handling
  • Ev
  • Event
  • Exif
  • Expect
  • FANN
  • FrontBase
  • FDF
  • FFI
  • Fileinfo
  • Filesystem
  • Filter
  • FastCGI Process Manager
  • FTP
  • Function Handling
  • GD
  • Gearman
  • Gender
  • GeoIP
  • Gettext
  • Gmagick
  • GMP
  • GnuPG
  • Hash
  • HRTime
  • Firebird/InterBase
  • IBM DB2
  • iconv
  • ImageMagick
  • IMAP
  • PHP Options/Info
  • Program execution
  • Inotify
  • intl
  • JSON
  • LDAP
  • libxml
  • Lua
  • LuaSandbox
  • LZF
  • Mail
  • Mailparse
  • Math
  • Multibyte String
  • McryptMemcache
  • Memcached
  • Mhash
  • Misc.
  • mqseries
  • MySQL (Original)
  • Mysql_xdevapi
  • MySQLi
  • Mysqlnd
  • Network
  • OAuth
  • OCI8
  • OPcache
  • OpenAL
  • OpenSSL
  • Output Control
  • parallel
  • Parle
  • Password Hashing
  • PCNTL
  • PCRE
  • PDO
  • CUBRID (PDO)
  • MS SQL Server (PDO)
  • Firebird (PDO)
  • IBM (PDO)
  • Informix (PDO)
  • MySQL (PDO)
  • Oracle (PDO)
  • ODBC and DB2 (PDO)
  • PostgreSQL (PDO)
  • SQLite (PDO)
  • MS SQL Server (PDO)
  • PostgreSQL
  • Phar
  • phpdbg
  • pht
  • POSIX
  • PS
  • Pspell
  • pthreads
  • Radius
  • Rar
  • Readline
  • Recode
  • Reflection
  • RpmInfo
  • RRD
  • runkit7
  • ScoutAPM
  • Seaslog
  • Semaphore
  • Sessions
  • Shared Memory
  • SimpleXML
  • SNMP
  • SOAP
  • Sockets
  • Sodium
  • Solr
  • SPL
  • SQLite3
  • SQLSRV
  • ssdeep
  • SSH2Stomp
  • Streams
  • Strings
  • SVM
  • SVN
  • Swoole
  • Sync
  • Taint
  • TCP
  • Tidy
  • Tokenizer
  • Trader
  • UI
  • ODBC
  • uopz
  • URLs
  • V8js
  • Variable handling
  • Varnish
  • WDDX
  • win32service
  • WinCache
  • wkhtmltox
  • xattr
  • xdiff
  • Xhprof
  • XLSWriter
  • XML Parser
  • XMLDiff
  • XMLReader
  • XML-RPC
  • XMLWriter
  • XSL
  • Yac
  • Yaconf
  • Yaf
  • Yaml
  • Yar
  • YAZ
  • Zip
  • Zlib
  • 0MQ messaging
  • ZooKeeper

What PHP Extensions Are Needed For WordPress?

PHP extensions needed to run WordPress

According to the WordPress handbook, WordPress needs:

  • 13 official PHP extensions for core performance (pink)
  • 9 official PHP extensions for fallback capabilities (orange)
  • 3 official PHP extensions if files are non-writable on the server (yellow)
  • 1 non-official PHP extension (blue)

What Do These PHP Extensions Do?

Here’s what these core PHP extensions do.

  • curl Performs remote request operations.
  • dom Used to validate Text Widget content material and to mechanically configure IIS7+.
  • exif Works with metadata saved in photos.
  • fileinfo Used to detect mime type of file uploads.
  • hash Used for hashing, together with passwords and replace packages.
  • imagick Provides higher picture high quality for media uploads.
  • json Used for communications with different servers.
  • mbstring Used to correctly deal with UTF 8 textual content.
  • mysqli Connects to MySQL for database interactions.
  • openssl Permits SSL-based connections to different hosts.
  • pcre Increases efficiency of sample matching in code searches.
  • sodium Validates Signatures and offers safe random bytes.
  • xml Used for XML parsing, resembling from a third-party web site.
  • zip Used for decompressing Plugins, Themes, and WordPress replace packages.

Fallback PHP Extensions

These are fallback PHP extensions, used if the core extensions usually are not carried out – i.e. maybe you’re operating an out-of-date PHP model.

  • bcmath For arbitrary precision arithmetic.
  • filter Used for securely filtering consumer input.
  • gd If Imagick isn’t put in, the GD Graphics Library is used
  • iconv Used to transform between character units.
  • intl Enable to carry out locale-aware operations.
  • mcrypt Generates random bytes when libsodium and /dev/urandom aren’t accessible.
  • simplexml Used for XML parsing.
  • xmlreader Used for XML parsing.
  • zlib Gzip compression and decompression.

PHP Extensions Used For File Changes

These PHP extensions are used when the file system can’t modify a file straight.

  • ssh2 Provide entry to remote machine resources (shell, remote exec, file switch)
  • ftp Implement shopper entry to files servers talking the File Transfer Protocol (FTP).
  • sockets Implements a low-level interface to the socket communication capabilities
Related Post  WordPress Categories

 Install PHP and PHP extensions

PHP 5.4 (default version on CentOS 6, 7) installation:

Command: sudo yum install php -y PHP extension installation:

Command: sudo yum install php-gd php-mysql -y   PHP 5.6 installation:

Command: sudo yum install php56u -y PHP extension installation:

Command: sudo yum install php56u-gd php56u-mysql -y   PHP 7.0 installation:

Command: sudo yum install php70u -y PHP extension installation:

Command: sudo yum install php70u-gd php70u-mysqlnd -y   PHP 7.1 installation:

Command: sudo yum install php71u -y PHP extension installation:

Command: sudo yum install php71u-gd php71u-mysqlnd -y

2. Restart Apache2 webserver

For changes to take effect, restart your Apache2 webserver. Service restarting can be done with the sudo systemctl command.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge