Turn Off Automatic Trash Deletion?
My guess is – yes, you are stuck with exactly that. Checks for EMPTY_TRASH_DAYS seem to be hardcoded as condition for switching interface between trash and delete in several places.
My guess is – yes, you are stuck with exactly that. Checks for EMPTY_TRASH_DAYS seem to be hardcoded as condition for switching interface between trash and delete in several places.
WordPress tells us: the WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted”. Or as the PHP docs put it [A memory limit] helps prevent poorly … Read more
After many hours of debugging and despair, the problem is now solved. It turned out to be a very obscure thing. The redirect is issued by the function ms_load_current_site_and_network() inside /wp-includes/ms-load.php. It was issuing the redirect because /wp-includes/ms-settings.php was not able to set a domain. The reason it was not able to set a domain … Read more
Using the defines the user sets in wp-config: mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); EDIT: Since your script is outside the WordPress environment, what you want to do is initiate it before using the defines in wp-config. require_once(‘./path/to/the/wp-config.php’); mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
I haven’t tested this, but if you would need to find such a solution, I would probably try to do it in the following way by adding a script into the if ( SOME_CHECK_IF_STEP-1_WAS_PASSED ) condition you’ve described above, that would: check the DB for the {$wpdb->prefix}sitemeta table; if it does not exist -> return … Read more
It’s not clear from your question what you are changing in each of these files, but I presume in each case it is the upload_max_filesize PHP setting. In general, settings will be applied in this order, each over-riding the previous value: php.ini Apache directives in .htaccess calls to ini_set() However, this setting is defined as … Read more
The “Hardening WordPress” page of the Codex contains a section on “Securing wp-config.php”. It includes changing the permissions to 440 or 400. You can also move the wp-config file one directory up from the root if your server configuration allows for that. Of course there is some danger to having a file with the password … Read more
When WP_DEBUG is set, WordPress sets (via wp_debug_mode() call early in core load process) the error reporting level to E_ALL & ~E_DEPRECATED & ~E_STRICT. This means all warnings and errors except strict errors and PHP deprecated functions (not WordPress ones). You can define your own level in a custom mu-plugin (the override needs to be … Read more
Symbolic links are … risky in WordPress. It is easier to use a separate domain for plugins per wp-config.php: define( ‘WP_PLUGIN_DIR’, ‘/local/path/to/plugin/directory’ ); define( ‘WP_PLUGIN_URL’, ‘http://plugins.dev’); See Strategy On Building Plugin Using Eclipse as an example for IDE configuration with such a setup.
localhost refers to the machine it’s running on. For example on my own site tomjn.com localhost is 127.0.0.1 as it always is. This doesn’t mean the hacker doesn’t know where to connect, it means the hacker replaces localhost with tomjn.com. Of course if I have a proxy sitting in front this won’t work, but keep … Read more