devgeniem/wp-define-more

Adds useful definable constants which are missing from the WP Core.

Installs: 46 820

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 8

Forks: 0

Open Issues: 0

Language:Shell

Type:wordpress-muplugin

1.0.1 2017-07-17 11:04 UTC

This package is auto-updated.

Last update: 2024-11-20 15:49:21 UTC


README

geniem-github-banner

WP Plugin: Define More

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

WordPress contains multiple nice options which you can set with define().

You can see good list of all them here: http://wpengineer.com/2382/wordpress-constants-overview/

This plugin adds even more stuff you can define().

Current custom definable variables

WP_UPLOADS_MAX_SIZE

WP_UPLOADS_MAX_SIZE - Set this to tell WordPress maximum uploads size. This is useful to tell /wp-admin/media.php javascript the maximum filesize in case your WordPress is running behind reverse proxy.

Example:

define('WP_UPLOADS_MAX_SIZE','10M');

WP_UPLOADS_DIR

WP_UPLOADS_DIR - Set custom directory for your uploads. This helped us to use glusterfs to synchronize only uploads folder between multiple nodes. It was too heavy process and much too unreliable to sync everything.

Example:

define('WP_UPLOADS_DIR','/var/www/uploads');

WP_UPLOADS_URL

WP_UPLOADS_URL - Set custom url for your uploads. We used this for mapping custom http://wordpress.test/uploads/ url with custom nginx root to WP_UPLOADS_DIR.

Example:

define('WP_UPLOADS_URL', WP_SITEURL . '/uploads/');