Skip to content

Adds useful definable constants which are missing from the WordPress Core

Notifications You must be signed in to change notification settings

devgeniem/wp-define-more

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/');

About

Adds useful definable constants which are missing from the WordPress Core

Resources

Stars

Watchers

Forks

Packages

No packages published