404 when fetching image from wp-content/uploads/

Problem solved. The plugin “User Access Manager” was found guilty of inserting a .htaccess file into wp-content/uploads/ and not handling calls properly afterwards. I don’t know how UAM plugin could be fixed, but It’s ok to remove the .htaccess file. Nothing else depends on it. (at least in my case)

Multisite 404 errors and non-www redirecting to home page

There is currently a bug in the functionality that handles the NOBLOGREDIRECT constant, which causes 404 errors on the main site to be redirected to the value of the constant. Apparently this is the expected behaviour for sub-directory networks (example.com/subsite), but should not take place on subdomain networks (subsite.example.com). There is a WordPress Trac ticket … Read more

How to trigger 404 for custom query var?

There is an action specifically for this: function my_parse_query( $wp_query ) { if ( $wp_query->get( ‘my_custom_var’ ) > 42 ) { $wp_query->set_404(); status_header( 404 ); } } add_action( ‘parse_query’, ‘my_parse_query’ ); That should load the 404.php template in your theme, if you have it. Otherwise, it will fall back to index.php. This will also trigger … Read more

WordPress generating 404 on .mp4 file in theme folder

Using get_template_directory_uri() or get_stylesheet_directory_uri() you can retrieve the url to your themes folder, and after that you just need to specify the path starting from there. Your code should look like this: <source src=”https://wordpress.stackexchange.com/questions/256580/<?php echo get_template_directory_uri() .”/assets/videos/videobg.mp4′; ?>” type=”video/mp4″>

Feed 404 Errors

For all those who might hit the same problem, here is the solution: Disable in Yoast the “remove category” option in advanced section. Then install this plugin: https://wordpress.org/plugins/remove-category-url/ ( do use any other plugin as this one works – yes, I tried them all) For some reason the Yoast solution and all other plugins don’t … Read more

Uploaded image, but not showing

I think the problem is that you are storing your images in /srv/www/wp-uploads/blog.linformatronics.nl/2013/01 but your link to the image is https://blog.linformatronics.nl/wp-uploads/2013/01/ccs5licence1.png. What you need to do is tell wordpress to store the images in /srv/www/blog.linformatronics.nl/wp-uploads/2013/01. What your trying to do, it seems, is store images in wp-uploads/blog.linformatronics.nl but the folders should be swapped. It’s the … Read more

How to disable a Custom Post Type Feed?

I’m also getting an error similar to that. The feed links get generated and put into the and that is where your 404 error is coming from. Here’s some code to disable feeds for a custom post type. https://gist.github.com/jaredatch/8610187#file-gistfile1-php <?php /** * Disable the “foo” custom post type feed * * @since 1.0.0 * @param … Read more

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