What error logs can I check to see why plugin updates are failing?

In wp-config.php, set the following (if not already set): define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( ‘display_errors’, 0 ); This will make sure that on the site no error is shown, however, WordPress will log all errors in debug.log file inside the /wp-content/ directory. NOTE: You must insert this … Read more

Allowing .exe uploads (old WPSE posts no longer work)

WordPress provide a hook to change the default mime types, like your hint in the question. The follow small code source demonstrated the change to allow a exe-file. add_filter( ‘upload_mimes’, ‘fb_enable_extended_upload’ ); function fb_enable_extended_upload ( array $mime_types = [] ) { $mime_types[ ‘exe’ ] = ‘application/exe’; return $mime_types; } It is not necessary to change … Read more

How can I save the original filename to the database?

How about saving the original filename inside the current $_REQUEST and processing it whenever WordPress generates the attachment metadata: /** * Store original attachment filename in the current $_REQUEST superglobal * * @param NULL * @param Array $file – Uploaded File Information * * @return NULL */ function wpse342438_store_attachment_filename( $null, $file ) { $_REQUEST[‘original_filename’] = … Read more

AJAX action not triggering PHP function

The problem is with the AJAX endpoint URL, i.e. url: userimg.ajax_url, which is not actually defined in your JS/PHP code. More specifically, you did define the correct URL, but in the JS object, the property name is ajaxurl and not ajax_url: // wrapped for brevity wp_localize_script( ‘ajax-account’, ‘userimg’, array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’, ‘relataive’ ) … Read more

Setting higher upload limit

add this to your .htaccess file in the root of WordPress installation directory: php_value upload_max_filesize 20M php_value post_max_size 20M and you can change 20 to whatever you want, unless your hosting server is limiting it it should work just fine. Update: Create the php.ini File and add the Following: memory_limit = 20M upload_max_filesize = 192M … Read more