- Настройка сервера (Apache + PHP) под WordPress.
- Среда PHP
- Среда WordPress
- Среда сервера
- Модули PHP
- Сайты с тарифными планами Personal или Premium
- Можно ли менять конфигурацию NGINX?
- Можно ли менять файл php.ini?
- Поддерживается ли на WordPress.com режим мультисайта?
- Вопросы
- Required PHP Extensions For WordPress – WPQuickies
- How Many PHP Extensions Exist?
- What PHP Extensions Are Needed For WordPress?
- What Do These PHP Extensions Do?
- Fallback PHP Extensions
- PHP Extensions Used For File Changes
- #WPQuickies
- Suggest a #WPQuickies Topic
- Watch Previous WPQuickies
- Looking to level up your WordPress development skills?
Настройка сервера (Apache + PHP) под WordPress.
- Если mod_rewrite не подключен, подключить mod_rewrite
- Включить поддержку .htaccess
- В корневом файле .htaccess отключить поддержку индексов. Для этого необходимо в начало файла дописать следующую строчку:
Настройка PHP (php.ini)
К сожалению, официальная информация по этой теме крайне скупа. Вся нижеприведенная информация получена опытным путем. Дополнения и комментарии приветствуются!
Стоит отметить, что WordPress корректно работает и без многих приведенных ниже модулей, т.к. имеет функции дублеры на случай отсутствия некоторых расширений. Это, конечно, здорово, но такие функции обрабатываются медленнее по сравнению с уже скомпилированными.
Расширения php, которые WordPress может задействовать:
- mysql — работа с БД MySQL. Без него никуда.
- ctype — необходим для корректной работы загрузчика файлов (как flash, так и браузерного). WP 2.9, если это расширение отсутствует, после попытки загрузки файла выдает ошибку: «Fatal error: Call to undefined function ctype_digit() in /wp-admin/includes/file.php on line 238»
- dom — используется начиная с WP 2.8 функциями отвечающими за поддержку постоянных ссылок на IIS. Похоже, с Apache это расширение можно не использовать.
- exif — позволяет работать с мета-данными jpeg- и tiff-изображений
- gd — необходим для создания и изменения изображений
- iconv — конвертация строки из одной кодировки в другую
- json — реализует формат обмена данными JavaScript Object Notation (JSON). Используется начиная с WP 2.9 классом WP_oEmbed
- posix — используется в классе WP_Filesystem_Direct
- mbstring — предоставляет функции для обработки строк в мультибайтных кодировках. Используется в классах POMO_Reader и PHPMailer. Обязательно установить параметр
mbstring.internal_encoding = UTF-8. Иначе возможны глюки. - simplexml — Используется начиная с WP 2.9 классом WP_oEmbed
- zip — для работы с zip-архивами
- zlib — для работы с gz-архивами
Также очень часто приходится изменять параметры отвечающие за загрузку файлов:
upload_max_filesize = 32M (по умолчанию 2 Мб) — максимальный размер загружаемого файла
post_max_size = 32M — максимальный размер переданных данных методом POST
Т.к. на загрузку бОльших файлов требуется больше времени стоит также поменять следующие параметры:
max_input_time = 60 (секунды) — максимальное время отведенное скрипту для получения данных
max_execution_time = 90 (секунды) — максимальное время выполнения скрипта
Среда PHP
На этой странице содержится информация о серверах для сайтов с тарифными планами, поддерживающими плагины. Эти сведения можно использовать, чтобы найти и устранить проблемы или принять решение о размещении вашего сайта у нас. Обратите внимание, что эти настройки нельзя изменить для отдельных сайтов.
Среда WordPress
Среда сервера
Модули PHP
- apcu
- bcmath
- calendar
- cgi-fcgi
- Core
- ctype
- curl
- date
- dom
- exif
- fileinfo
- filter
- gd
- gmagick
- gmp
- hash
- iconv
- imap
- intl
- json
- libxml
- mbstring
- mcrypt
- memcache
- mysqli
- mysqlnd
- openssl
- pcntl
- pcre
- PDO
- pdo_mysql
- pdo_sqlite
- Phar
- posix
- Reflection
- session
- shmop
- SimpleXML
- soap
- sockets
- sodium
- SPL
- sqlite3
- standard
- sysvsem
- sysvshm
- timezonedb
- tokenizer
- xml
- xmlreader
- xmlwriter
- xsl
- Zend OPcache
- zip
- zlib
Сайты с тарифными планами Personal или Premium
Эта информация относится только к сайтам с тарифными планами, в рамках которых установлены пользовательские плагины или темы. Сайты с планами Personal и Premium размещаются в другой среде, и для них эта функция не поддерживается, поэтому данное руководство к ним не применимо.
Можно ли менять конфигурацию NGINX?
Некоторые плагины и темы могут выдавать сообщения о том, что для работы им требуется внести изменения в конфигурацию NGINX. Тем не менее это невозможно здесь, на WordPress.com. Если плагин или тема предлагают внести изменения, свяжитесь с разработчиками, чтобы выяснить, есть ли у них альтернативные решения.
Можно ли менять файл php.ini?
Некоторые плагины и темы могут сообщать о том, что для работы им требуется изменить файл php.ini . Тем не менее это невозможно здесь, на WordPress.com. Если плагин или тема предлагают внести изменения, свяжитесь с разработчиками, чтобы выяснить, есть ли у них альтернативные решения.
Поддерживается ли на WordPress.com режим мультисайта?
Нет. В настоящее время режим мультисайта на WordPress.com не поддерживается.
В тарифные планы WordPress.com входит обширный перечень функций для одного сайта. Если вы хотите создать на WordPress.com несколько сайтов, новый сайт можно создать в существующей учётной записи WordPress.com. Затем для каждого нового сайта можно приобрести отдельный тарифный план.
Вопросы
Чтобы получить ответы на любые вопросы, касающиеся информации на этой странице или наших услуг хостинга, свяжитесь с нами.
Информация на этой странице может быть изменена без предварительного уведомления.
Required PHP Extensions For WordPress – WPQuickies
In this lunchtime WPQuickies, I’ll be listing the required PHP extensions that WordPress needs to run properly.
WordPress is an event-driven app built in PHP.
PHP is a dynamic language that compiles code in real-time to generate HTML as an output.
For the WordPress stack, most of the dynamic data come from functions and a database.
The output is sent to the webserver and along with static assets such as image files, CSS files, JavaScript files, the web server creates the final full web page and sends that back to the requesting browser.
What Are PHP Extensions?
Similarly to extending WordPress core functionality by installing plugins, the core PHP programming language can gain additional functionality by using extensions.
PHP extensions are compiled libraries installed in a folder within the PHP installation folder. The extract folder name is specified in the php.ini configuration file – there is no default extension folder file or pathname.
To find the folder on Linux-based installations, from the command line you can type:
php -i | grep extension_dir
On other operating systems, you can look directly in the php.ini configuration file to locate the extensions directory.
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
- 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?
According to the WordPress handbook, WordPress needs:
- 13 official PHP extensions for core functionality (pink)
- 9 official PHP extensions for fallback functions (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 and to automatically configure IIS7+. - exif
Works with metadata stored in images. - fileinfo
Used to detect mime type of file uploads. - hash
Used for hashing, including passwords and update packages. - imagick
Provides better image quality for media uploads. - json
Used for communications with other servers. - mbstring
Used to properly handle UTF 8 text. - mysqli
Connects to MySQL for database interactions. - openssl
Permits SSL-based connections to other hosts. - pcre
Increases performance of pattern matching in code searches. - sodium
Validates Signatures and provides secure random bytes. - xml
Used for XML parsing, such as from a third-party site. - zip
Used for decompressing Plugins, Themes, and WordPress update packages.
Fallback PHP Extensions
These are fallback PHP extensions, used if the core extensions are not implemented – i.e. perhaps you are running an out-of-date PHP version.
- bcmath
For arbitrary precision mathematics. - filter
Used for securely filtering user input. - gd
If Imagick isn’t installed, the GD Graphics Library is used - iconv
Used to convert between character sets. - intl
Enable to perform locale-aware operations. - mcrypt
Generates random bytes when libsodium and /dev/urandom aren’t available. - 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 directly.
- ssh2
Provide access to remote machine resources (shell, remote exec, file transfer) - ftp
Implement client access to files servers speaking the File Transfer Protocol (FTP). - sockets
Implements a low-level interface to the socket communication functions
#WPQuickies
Join me every Thursday at 1 pm Sydney time for some more WPQuickies – WordPress tips and tricks in thirty minutes or less.
Broadcasting live on YouTube and Facebook.
Suggest a #WPQuickies Topic
If you have an WordPress topic you’d like to see explained in 30 mins or under, fill out the form below.
Watch Previous WPQuickies
Looking to level up your WordPress development skills?
I self-taught myself WordPress development, but this book took it to another level.
Each chapter builds upon the next, but you can also use it to jump into specific areas like WP Cron, WP REST endpoints, building a custom plugin repository etc.
If you’re like me and like having reference books at hand, this is the one that sits on my desk all the time.