Files not uploading to CDN is somewhat common problem and happens with two major WordPress Cache Plugin. Here is guide to solve the problem with blob based CDN. We will give example with Rackspace Cloud Files here, but the situations and solutions for Files not uploading to CDN in WordPress is the same in all Origin Pull and Origin Push CDN.
Files not uploading to CDN in WordPress : Understanding the situation
These are causes for Files not uploading to CDN in WordPress for new users (beginner’s level) :
- The Settings are not right in WordPress Plugin page (W3 Total Cache or WP Super Cache Plus CDN Sync Tool)
- CDN Bucket / Container is not published or made public
- Username, password or API (if needed) are wrong.
Before going to the advanced problem for Files not uploading to CDN in WordPress and its solution, make these above mentioned 3 points 100% correct.
The Dangerous Reason for Files not uploading to CDN in WordPress
This happens with bigger to medium blogs with thousands of pictures. Its not solitary, usually apart from Files not uploading to CDN, there will be problem with magnification, images will not load etc.
This problem happens due to apparent corruption of wp-content/uploads folder. Most keeps the settings of CDN tools to default and that points to uploads folder. These CDN tools, mostly uses cURL function to upload the files. Somehow, these plugins can not delete the older junks of combined files, the set deletion chmod never works.
Now if some one garbage the website’s backup on uploads folder, it becomes more pathetic to open. We are mentioning a case, where the webmaster consulted us to solve the problem. His problems were :
- Files not uploading to CDN
- No thumbnails are showing
- No minification, as if there is no Plugin working
He tried himself to regenerate the thumbnails and it created more problems. When we tried to open the uploads folder, WinSCP failed, crushed. We understood its so big that its not possible to open normally. We tar it from shell, oh dear, the size of uploads folder in tar-ball was 2.5 GB ! There should be not more than 700 mb files from calculation.
Filezilla will usually not show the minified files in SFTP. You will need WinSCP to open the uploads folder manually. Its better if you can delete or move the other folders (non native WordPress folders like backup folder), making it a bit ‘light’ in size.
WinSCP might crash few times, your target is to delete the old minified files and odd files, it will look like a junk actually. Normally there should be only year-wise archives. After deleting the junks, take a backup of the uploads folder, and in our described way, create a test WordPress installation and you will see, everything is working fine.