How do I maintain static directories on multisite subdomains?

The standard WP RewriteRules ignore files and directories that “exist”. Example: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress This the rewrite rule set for a WP install in the “root” of a site. Notice these … Read more

sanitize attachment filename

Following on from question comments. You can run a filter on sanitize_file_name_chars and add the degree symbol to the array of invalid chars, but it won’t halt the upload it will simply strip the file extension. However you can add another filter stop the upload, in a hacky kind of way by additionally hooking on … Read more

wp-config.php file permissions

Which file and directory permissions should I set on a new WordPress/LAMP installation? There is no definite answer to this. It varies depending on the server setup. The rule of thumb is to use the minimal permission to make WordPress work on a server. This means to start with 400 (or 600) and go from … Read more

Uploading non-media files?

There are two ways that error can be triggered ( source ): user does not have unfiltered_upload capability; WP does not like file type or extension. Latter is checked by wp_check_filetype_and_ext() function ( source ) that filters return through wp_check_filetype_and_ext hook to allow validation of additional file types.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)