Receiving 404 when uploading file larger than 10kb

Check the nginx error.log (based on nginx.conf error_log location). $ sudo nano /path/to/nginx/error.log There is a “permission denied” error on /var/lib/nginx. This happened because I changed the user setting in nginx.conf from user nginx; to something else. In this case, user iam; Solution: Check the current user and group ownership on /var/lib/nginx. $ ls -ld … Read more

upload_mimes not accepting CSV

You can’t upload anything except images, documents, audio or video files—and it’s good for security, But in case you want to allow specific file type to upload in media library you will have to define ALLOW_UNFILTERED_UPLOADS. Put this code in wp-config.php file. define( ‘ALLOW_UNFILTERED_UPLOADS’, true ); This code doesn’t allow every user to upload every … Read more

Protecting uploads not working

And the culprit was… my apache config. Please do not forget to edit the apache configuration in /etc/apache2/apache2.conf and add the lines <Directory /var/www/html/> AllowOverride All </Directory> I still have a question. It seems (but it may be related to the fact that the site is still in localhost) that this method does not prevent … Read more

Upload Button in meta box not opening library

You mentioned that you’ve added the meta box for pages: I have created a custom template, added two metaboxes in Pages using a ‘Page_Fiche_Metier.php’ template. However, in prfx_image_enqueue(), the code only runs if the post type is post. Changing prfx_image_enqueue() so that it checks for the page post type will fix the issue. function prfx_image_enqueue() … Read more

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