How to individually set WP_DEBUG on a sub-directory multisite?

You can do this by adding some code to wp-config.php $request_uri = $_SERVER[‘REQUEST_URI’]; $debug_dirs = array (‘/debug-dir1/’,’/debug-dir2/’); // list of directories to turn on debugging foreach ($debug_dirs as $debug_dir) { if (!strncmp($request_uri,$debug_dir,strlen($debug_dir))) { define(‘WP_DEBUG’, true); } } define(‘WP_DEBUG’, false); // debug off by default

Permissions to wp-content folder in Windows Server 2012

There are actually 3 users that IIS access files with on .NET sites: IIS_IUSRS, IUSR, and NETWORK SERVICE Grant all 3 IIS users Read & Execute, List Folder Contents, Read permissions on the entire WP folder For file management (e.g. plugin/theme installation & updates), grant all 3 of the IIS users Full Control on the … Read more

Could a large quantity of files in the uploads folder affect performance?

Short Answer: No A different question is: Will uploading a large number of files in WordPress affect performance? The answer to this: Most likely not. Reason: WordPress uses the DB to get a list of uploaded files (almost no difference for many files) FTP uses the filesystem (slower for many files) Details: WordPress does not … Read more

Multisite in subfolder – How to make new sites to be in same level subfolders as the main site

After these years I hope this will still answer your question… I think I’ve got the situation working you want. Allthough I don’t have the WordPress installation in ‘/subfolder/’, but I’ve a installation ‘in subdirectory’ per language, and on the same level: my-domain.com/nl/ -> this is primary installation, site id = 1 my-domain.com/en/ -> this … Read more

Move WordPress to subdirectory, keep ALL URLs

The procedure is thoroughly documented in Codex under Moving a Root install to its own directory. You misunderstand the point about changing URLs in it, and yes the terminology sucks. The only URLs that will change are those that are based on the “WP address”. That would be WordPress core, essentially the admin area. All … Read more

What is the best way to get directory path for wp-config.php?

I came up with this solution. This function checks in each directory level starting from the directory of the current file for the file wp-config.php. <?php function find_wp_config_path() { $dir = dirname(__FILE__); do { if( file_exists($dir.”/wp-config.php”) ) { return $dir; } } while( $dir = realpath(“$dir/..”) ); return null; } ?> To actually include the … Read more