wordpress mu image speed problem - wordpress

I have an mu install with the typical blogs.dir folder storing files for each blog. When loading these images however they take forever to appear, but they eventually do. It seems that wpmu uses php to serve each image which is ludicrous. When using images from the same domain but in a root folder, the images are displayed quickly.
Is there a workaround the blogs.php for rendering files?
Could there be something else wrong in the settings of my install?

Hard coding the Rewrite Rule instead of using blogs.php is a temporary workaround with huge speed differences. This can only work if you already know the blog ID's.

Related

'Visual Composer' plugin is outputting weird image links

Morning everyone, i'm having a super weird issue with my recent wordpress migration. I moved the (working) site to another webspace and i'm slowly running out of ideas (jk, already ran out).
Issue: After the migration, the plugin Visual Composer is outputting nonsense image links to the frontend that look like this: https://i.imgur.com/7RocCmE.png instead of the uploaded images url. Result: No images are showing on the frontend.
This issue only happens when i use the single image block provided by VC itself. Inputting an image the wordpress way, inside of a text block, works.
What could be the reason for this? i'm super thankful for any advice since i'm not a programmer.
I have already tried:
Enabling wp debug, not getting any errors
Installing different versions of Visual Composer, multiple times
Reinstalling Wordpress, multiple times
disabling all plugins
completely reinstalling and reuploading everything from scratch
different php versions
As I saw in your screenshot with the src attribute of your image and it has data-src attribute also, I think that it's because the new site (or maybe the new hosting) is using lazy load which will update all images source of the site to the lazy load image for better performance.
Lazy load images mean that the image won't load at the beginning, when you start to scroll down to each section, the images of this section will be loaded. In this way, the site will be optimized and won't load many resources at the beginning.
I think you can:
Check if there is any cache plugin installed, try to deactivate this plugin.
Check with the hosting provider if there is any cache setting installed, try to deactivate this setting also.
See if the image is working in the backend or not, if it's still loaded in the backend, I'm pretty sure that it's the cache issue. If it doesn't load in the backend, I think there is something wrong with your theme source code.
Compare the hosting environment, especially the PHP version of the old and new site to see if there is any differences.

Wordpress old/updated/deleted CSS files are being served minified and I cant delete them. Why?

Backstory
We are using a LAMP stack (bitnami) to run a multisite Wordpress instance. This is the second time I have ran into a file that will not update when we push an update (We use git and pull the latest changes to the bitnami server).
We have noticed that when deleting (renaming for that matter) the file, it can still be retrieved by performing a GET on the resource (or the url in a browser). Also, if we were trying to make changes the changes do not come with the file - it is still the old file. Interestingly enough, the file is minified, which because of issues with this in the past we do not use any plugins that minify our CSS. So there should be no reason for it to be minified.
We have WP Total Cache - clearing all caches is successful but does not stop this from happening. (We used to use WP Super Cache, when this bug happened we decided to change plugins to WP Total Cache and purged the cache and it fixed the problem - but it is back and that no longer works).
I have also seen the trick where we can use a "?ver=###" query param on the url. This works but this would prevent us from using CloudFront for our files (currently disabled for all this testing so its not the problem either). Also I am not convinced it is a long term solution - or a solution at all since these minified files are being created and shouldnt be in the first place.
Additional information
It may not be helpful, but the files we have noticed this with are in a theme folder that is not technically an active theme. We just use the folder for additional resources that we have created ourselves. We reference them in the head of some pages.
Example:
/wp-content/themes/active-theme <- The active theme
/wp-content/themes/resources <- Our custom resources
Questions:
Where is this file being stored?
How can I delete it?
How can I prevent this from wasting our time ever again?
I found that the issue was with the bitnami server itself. The Apache2 module PageSpeed was causing the served files to be minified and cached resulting in the pages never updating no matter what we did on wordpress.
Apache:
To disable PageSpeed, comment out the following lines in your httpd.conf (/opt/bitnami/apache2/conf/httpd.conf)
#Include conf/pagespeed.conf
#Include conf/pagespeed_libraries.conf
Solution found here

Wordpress website loading extremely slow

I have a question. I have this website, the ftp looks like this:
The main website is inside the httpdocs folder. But outside that folder there are like 3 different copies of the website inside the httpdocs folder. Will having so many copies of the main website OUTSIDE the httpdocs folder affect the speed of my website INSIDE the httpdocs folder. I think it would if it were inside the httpdocs folder but in this case its outside of it, will it affect my websites speed?
**incase you're wondering why i have the copies its because 1 is a backup and one is development environment.
No, it should not. First of all check if your server CPU & RAM is not overflowing
But there is so much to do to fix wp speed:
Install caching plugin - I would recommend W3cache or WProcket cache. You can find optimal settings online.
minify CSS/JS - you can do it using the caching plugin
Install autoptimize and "above the fold" plugins for mainpage optimization
optimize images - save for web, combine into sprites, use base64
install CDN - cloudflare is free but maxcdn have better parameters.
Use GTMETRIX to monitor your progress
update your .htaccess file
install p3 performance plugin to check which plugins are slowing you down
check if your theme is not causing to much slowing - maybe you can combine css/js files
see if you not using too much external files.
Reduce number of requests and number of dom elements - use DOM Monster extension in chrome
I will follow this question. update me with your progress and I can give more tips here
Test your server in https://www.webpagetest.org/ and check for which file it take longer time. i don;t think it make any problem out side of htdocs folder
Just check the WP-Content folder and check there size of images, try to decrease the size of images.
and check the RAM of Server is it free or fully loaded ?

How to figure out file path redirection for images using 301 redirection with htaccess?

I'm having a weird redirection issue and can't figure out how to solve it. I installed my Wordpress in a directory (called /Cafe/ ) for my KatsCafe.org website and all the posts are being redirected just fine. But a huge number of my images are messed up. They won't redirect without the /Cafe/ in the URL, while none of my older URLs for images included a directory. My site is graphic/image heavy and many of them show up in Google Image searches so I am losing a lot of traffic over this.
I can't figure out how to redirect from two separate file paths to the current one.
My oldest file path was from when I installed Wordpress in the root directory with a previous host, so image from that installation would have the file path:
Http://katscafe.org/wp-content/uploads/year/month/name-of-file
to the current image file path, which would be:
Http://katscafe.org/Cafe/wp-content/uploads/year/month/name-of-file
I have another less important redirection I am having a few errors from as well, stemming from the short while I tried out a multisite option (silly me, I thought I would enjoy not having to handle updates, etc ... but I'm entirely too OCD to enjoy that, LOL). Since that meant that my files were in a multi-site directory listing, the file path would have been:
Http://katscafe.org/files/year/month/name-of-file
and still needs to forward to the current image file path, which again, is:
Http://katscafe.org/Cafe/wp-content/uploads/year/month/name-of-file
I'm not sure if I am overlooking an obvious tool that can help me figure this out, but every tool I've found involves post redirection, not a file path type of redirection. And even then I'm not entirely sure of my ability to figure it out completely.
I would be forever grateful for any help with this! Thanks so much!

Mask file path

I am developing a site based on Drupal CMS and it has awesome image managing tools but there is a problem: While the images are being nicely resides rotated or else their paths become a bit weird for a common user.
It just so happens that users will see a lot of my images urls and I want them to look short, nice, and pretty. Since there is powerful module called Pathauto for Drupal users I just thought that changing masking files original url could be as simple as nodes.
Could it be that easy? If so, how? Maybe there is more than one way to do it? Could some non-Drupal way do the job?
You could try editing the htaccess file. It seems someone else has had that same thought... Drupal alias your file paths using htaccess

Resources