Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?

Is it possible to set different WP_CONTENT_URL values for different sub-sites in wp-config.php ? Ans: Yes it is. If sub sites are installed on sub-domain, An example to define it this way – define( ‘CURRENT_SITE_DOMAIN’, $_SERVER[‘HTTP_HOST’] ); if( ‘sub1.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub1-abcdefghijk.cloudfront.net/wp-content’ ); } elseif( ‘sub2.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub2-abcdefghijk.cloudfront.net/wp-content’ … Read more

Renaming wp-content folder dynamically

Don’t do what seems to be possible… You can use the possibility to change the WordPress constants WP_CONTENT_DIR and WP_CONTENT_URL in your wp-config.php. BUT it really, really, really, really is not recommended. Why? not recommended?? It’s pretty easy: Just do a cross file search (with your IDE or for e.g. Notepad++) for wp-content and you’ll … Read more

WP Config for FTP credentials

define(‘FS_METHOD’, ‘ftpext’); define(‘FTP_BASE’, ‘/path/to/wordpress/’); define(‘FTP_CONTENT_DIR’, ‘/path/to/wordpress/wp-content/’); define(‘FTP_PLUGIN_DIR ‘, ‘/path/to/wordpress/wp-content/plugins/’); define(‘FTP_PUBKEY’, ‘/home/username/.ssh/id_rsa.pub’); define(‘FTP_PRIKEY’, ‘/home/username/.ssh/id_rsa’); define(‘FTP_USER’, ‘username’); define(‘FTP_PASS’, ‘password’); define(‘FTP_HOST’, ‘ftp.example.org’); define(‘FTP_SSL’, false); http://digwp.com/2010/11/ftp-in-wpconfig/

Does changing ‘WPLANG’ in wp-config.php just effect the admin language or does it have other consequences?

WPLANG effects the whole site not just the admin section, you can use it in conjunction with WPML. It basically sets what language you have translations for but you must include a languages folder inside wp-include with the appropriate .mo and .po files. You can also set WPML to use the default languages directory ( … Read more

Override Current Theme Setting in wp_config.php

Drop this in a plugin & activate. I should note this doesn’t take into account things like child themes – it’s purely for toggling which theme renders based on SOME_FLAG. add_filter( ‘stylesheet’, ‘switch_ma_theme’ ); add_filter( ‘template’, ‘switch_ma_theme’ ); function switch_ma_theme() { // Return the theme directory name return SOME_FLAG ? ‘theme-1’ : ‘theme-2’; }