Docs / WPMU DEV Hosting / Allowed & Disabled Functions & Commands

16. Allowed & Disabled Functions & Commands

Written by Patrick Cohen & Katherine Pannell | Last updated: April 12, 2021

Our hosting environments are designed to provide the best WordPress experience possible, so many of the workarounds members may have employed with other hosts are completely unnecessary and are automatically filtered or disabled.

For example, some wp-config.php modifications actually conflict with our system and will adversely affect both member sites and our hosting environments. These include cron jobs and modifications to the WordPress file system or memory limitations.

This document aims to be your go-to reference for any disallowed functions, commands & constants in the WPMU DEV hosting environment.

16.1 wp-config.php Constants Protection

Copy chapter anchor to clipboard

Cron Jobs

To ensure your scheduled tasks run on time, every time, WPMU DEV hosting environments utilize server-side crons (crontab), by default, and call the WordPress scheduling system via WP-CLI every 5 minutes – eliminating the need for alternative cron usage or external services.

File System

Our hosting environments leverage the default WordPress file system to achieve a sustainable balance between performance, security and stability. We understand that members may have been compelled to modify the file system to compensate for the shortcomings of other hosts, but those modifications are not necessary with WPMU DEV hosting and can cause significant issues server-side. Therefore, we do not allow modifications to the wp-content name directory via FS_constants like FTP.

Modifications to the following constants will be removed:

WP_CONTENT_DIR
WP_CONTENT_URL
FS_CHMOD_DIR
FS_CHMOD_FILE
FS_METHOD
FTP_CONTENT_DIR
FTP_PLUGIN_DIR
FTP_BASE
FTP_PUBKEY
FTP_PRIKEY
FTP_USER
FTP_PASS
FTP_HOST
FTP_SSL

Memory Limits

WPMU DEV hosting allows memory limits (WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT) of 256MB for Bronze and Silver plans, while Gold and Platinum plans are allowed 512MB.

Modifications to the following constants will be filtered:

WP_MEMORY_LIMIT
WP_MAX_MEMORY_LIMIT

How to Increase Post Revisions

Did you know that WordPress has a revision feature that lets you revert posts and pages back to older versions in the event you make a mistake? Though helpful, this feature can expand your website’s database size, eventually leading to bloating.

For this reason, on WPMU Dev, WordPress revisions are set to a maximum of 5.

Thankfully, you can always increase the number of allowable revisions on your website.

To do so, you will need to access and edit your website’s wp-config.php file via  SFTP, or through the File Manager.

Once there, locate the line which includes this code define( 'WP_POST_REVISIONS', 5 );

WordPress Post Revisions

Then replace “5” with “true” so as to have code that looks like this:
define( 'WP_POST_REVISIONS', true );

Don’t forget to save the changes you just made before exiting. Now, you can start enjoying unlimited revisions on your posts and pages.

16.2 Allowed SSH Commands

Copy chapter anchor to clipboard

Here is a list of all of the SSH commands we allow:

  • ?
  • agrep
  • awk
  • basename
  • bunzip2
  • bzip2
  • cat
  • cd
  • clear
  • col
  • colrm
  • column
  • composer
  • cp
  • curl
  • cut
  • date
  • du
  • echo
  • egrep
  • expand
  • fgrep
  • fmt
  • fold
  • gettext
  • git
  • git-receive-pack
  • git-shell
  • git-upload-archive
  • git-upload-pack
  • grep
  • gunzip
  • gzip
  • head
  • help
  • iconv
  • join
  • less
  • ll
  • ln
  • look
  • ls
  • man
  • mkdir
  • more
  • mv
  • mysql
  • mysqldump
  • nano
  • nl
  • npm
  • pager
  • paste
  • perl
  • php
  • ping
  • pr
  • rm
  • rsync
  • scp
  • sed
  • sort
  • tail
  • tar
  • touch
  • tsort
  • uname
  • unexpand
  • uniq
  • unzip
  • vi
  • vim
  • wc
  • wget
  • wp
  • zcat
  • zgrep
  • zip

Also please note we don’t allow pipes or redirects.

16.3 Disabled functions - php.ini

Copy chapter anchor to clipboard

Below you will find a list of disabled functions on our hosting.

  • exec
  • shell_exec
  • passthru
  • system
  • proc_open
  • popen
  • show_source
  • posix_kill
  • posix_mkfifo
  • posix_setpgid
  • posix_setsid
  • posix_setuid
  • posix_getpwuid
  • posix_uname
  • pclose
  • dl
  • disk_free_space
  • diskfreespace
  • disk_total_space
  • proc_close
  • proc_get_status
  • proc_nice
  • proc_terminate
  • symlink
  • link
  • escapeshellarg
  • escapeshellcmd
  • highlight_file
  • lchgrp
  • lchown
  • prog_get_status
  • getmypid
  • getmyuid
  • getmygid
  • getrusage
  • getmyinode
  • get_current_user
  • libxml_disable_entity_loader
  • pcntl_alarm
  • pcntl_fork
  • pcntl_waitpid
  • pcntl_wait
  • pcntl_wifexited
  • pcntl_wifstopped
  • pcntl_wifsignaled
  • pcntl_wifcontinued
  • pcntl_wexitstatus
  • pcntl_wtermsig
  • pcntl_wstopsig
  • pcntl_signal
  • pcntl_signal_dispatch
  • pcntl_get_last_error
  • pcntl_strerror
  • pcntl_sigprocmask
  • pcntl_sigwaitinfo
  • pcntl_sigtimedwait
  • pcntl_exec
  • pcntl_getpriority
  • pcntl_setpriority
  • putenv
  • opcache_get_configuration
  • opcache_get_status

16.4 Disabled functions - PHP CLI

Copy chapter anchor to clipboard

Below you will find a list of disabled functions on our hosting.

  • shell_exec
  • passthru
  • system
  • show_source
  • posix_kill
  • posix_mkfifo
  • posix_setpgid
  • posix_setsid
  • posix_setuid
  • posix_getpwuid
  • posix_uname
  • pclose
  • dl
  • disk_free_space
  • diskfreespace
  • disk_total_space
  • proc_get_status
  • proc_nice
  • proc_terminate
  • symlink
  • link
  • escapeshellcmd
  • highlight_file
  • lchgrp
  • lchown
  • prog_get_status
  • getmypid
  • getmyuid
  • getmygid
  • getrusage
  • getmyinode
  • libxml_disable_entity_loader
  • pcntl_alarm
  • pcntl_fork
  • pcntl_waitpid
  • pcntl_wait
  • pcntl_wifexited
  • pcntl_wifstopped
  • pcntl_wifsignaled
  • pcntl_wifcontinued
  • pcntl_wexitstatus
  • pcntl_wtermsig
  • pcntl_wstopsig
  • pcntl_signal
  • pcntl_signal_dispatch
  • pcntl_get_last_error
  • pcntl_strerror
  • pcntl_sigprocmask
  • pcntl_sigwaitinfo
  • pcntl_sigtimedwait
  • pcntl_exec
  • pcntl_getpriority
  • pcntl_setpriority
  • opcache_get_configuration
  • opcache_get_status

16.5 Modifying PHP with .user.ini

Copy chapter anchor to clipboard

Ideally, you would not need to even consider modifying any variables in a .user.ini file, as our managed WordPress hosting & server architecture are optimized for best performance for WordPress installs.

However, WPMU DEV members can modify some php settings with a .user.ini file if absolutely necessary. A .user.ini file is a simple text file you create and place within the WordPress root directory. It only impacts the PHP settings for the directory in which it exists and that folder’s sub-directories.

While some PHP settings can be modified within any system-wide limitations of our managed WordPress hosting, it’s important to note that they cannot circumvent or exceed those limitations. For example, the upload_max_filesize value can be adjusted, but cannot exceed the maximum of 128Mb established by the system-wide PHP settings.

Also, certain variables will always reset to their default values on our managed WordPress hosting:

  • The memory_limit variable will always reset to the default 256Mb for Bronze & Silver hosting plans, or 512Mb for Gold & Platinum plans.
  • The max_execution_time variable will always reset to the default value of 300s.

If you are uncertain if the PHP setting you wish to modify is allowed, contact WMPU DEV 24/7 support.

16.5.1 Creating a .user.ini file

Link to chapter 5

The easiest way to add a .user.ini file to the public_html directory is to create and upload a simple text file with an FTP client. Filezilla is used here, but the process is essentially the same for other popular FTP clients.

Open your FTP client and connect to your site. If you need help with that, follow the guidance provided in the Connection Info section of our SFTP/SSH guide.

Open the public_html directory, and right-click, or control-click on a Mac, anywhere within the file list area and click the Create new file option.

create .user.ini file for ftp

Name the file .user.ini, being sure to include the period before the word user.

name the file .user.ini

Right-click the new .user.ini file and click View/Edit to open the file in your FTP client’s editor. Insert your PHP settings directives, then save and upload the file. It may take a few minutes for the settings to propagate.

open .user.ini to make changes

Insert your PHP settings directives, then save and upload the file. It may take a few minutes for the settings to propagate.

16.5.2 Verify PHP with phpinfo.php

Link to chapter 5

If you wish to view both the default system PHP settings and your local settings, you may do so by creating a file within the public_html directory in the same manner described above, only name the file phpinfo.php. Paste this single line of code into the file, then save and upload:

Next, enter your URL, followed by the extension /phpinfo.php, into a browser. This will retrieve a report that shows which PHP build is running, some information about your server, and both the system and local PHP settings. You can also compare your local settings to the default php.ini settings by checking the Local Value and Master Value columns under the various section headings.
view php settings with phpinfo file
It’s a good idea to remove the phpinfo.php file from your site after you’ve viewed the report. As long as the file exists, that report can be produced by anyone from any browser.