Yes, the .htaccess in public_html.
Try putting it at the very first line, before # BEGIN WordPress
. The # means a comment, and is ignored, so that shouldn’t matter.
This adjusts your server environment BEFORE WordPress even starts. It depends on how the server is configured, and if it allows Imagick variables to be set this way. It’s not a guaranteed fix.
I have not tried the functions.php file fix. You run the risk of that file being over-written if you update a theme. My theme provider has another method for updating your WordPress PHP variables:
- Install and activate the GeneratePress Simple PHP plugin. Find the Download Simple PHP link at GeneratePress.com.
- Once activated, go to “Appearance > Simple PHP” and you’ll be directed to a file where you can add your custom PHP.
- Enter this code into Simple PHP:
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
This changes WordPress from Imagick to GD for image processing. Your server may or may not include GD, and the GD configuration may or may not work for WordPress. The only way to find out is to try one fix; if it doesn’t work, UNDO that, then try the other fix.
If it STILL doesn’t work, then we (as a WordPress community) need to keep working to find another viable solution.