I have a wordpress site, and it has more that 30k posts.
Every post has own feature image, and each feature image has 10 responsive sizes.
#10076 post has 13 thumbnails
So there are about 300k image files, and this reaches to the File Usage Limit(inode limit) of hosting service.
File Usage Indicator
How can I reduce the number of thumbnails?
For example, when we use 2~3 thumbnails, we can store 120k~180k posts.
Well, are there any other hosting services which can store more than 300k files?
Sure, it is possible. There are several plugins in the WP repository that will automatically push uploads to S3 or some other CDN (e.g. WP Offload S3 Lite).
But the biggest challenge you'll face is in migrating the huge collection of images you already have. Anything you run from a web browser will almost certainly die trying. WP-CLI is the only real option for large-scale maintenance tasks. Take a look at S3-Uploads.
Alternatively you could push files to S3 manually and dynamically rewrite media URLs in WordPress by hooking into post_thumbnail_html or some such. You could build a cachable "does this exist?" check into your filter so it only rewrites image URLs that can actually be found at Amazon.
empty your trash folder in File Manager and file usage will drop significantly.
Related
What can WooCommerce site owners do to optimize their site. Those owners are those to whom I developed an online store.
After some time of operation, the site gets bigger in disk size, I suppose it's due to a growth in the mySql database.
Is there a plugin that the customers can use to optimize their site without knowing anything about databases and wordpress tech stuff?
There are a lot of guides on how to optimize WordPress websites. Here is one. The most basic thing everyone should do is to use a caching and image optimization plugin.
But for WooCommerce specific actions that you can take, the one thing you can do is install the custom orders table plugin. This puts all of the WooCommerce data in a separate database table. However, it does require using wp-cli, so a person would have to know how to SSH in and run the command. It is easy to automate doing this though.
As for bigger disk sizes, if a WordPress database is more than a few GB in size something is terribly wrong. Normally it's only a few hundred MBs. So no, large websites don't happen because the database growing. It's from the stuff getting stored in the wp-contents folder. WordPress stores will store multiple copies of each image at different resolutions, and this along with having lots of plugins and themes downloaded can increase the size of the website, but it still won't get ridiculously big. Although once you add a backup plugin on top of the size of the website gets multiplied. A good backup plugin should default to not keeping around too many local backups. The most serious issues I've seen happen when there are multiple backup plugins, and they start including in their backups all of the backups created by the other plugin. You will then get exponentially bigger backups, and the size of the website will quickly get out of control.
So that's what causes websites to be bigger, and website owners will inevitably add more plugins and images to the site over time, increasing the size of the website, but even worse, all of the additional plugins will slow the website down.
You also need to make sure you're clients are using a good webhost. The guide I shared has some criteria you can use to judge a good hosting company. The one thing that many hosting companies don't have is some sort of in memory cache. Look for hosting companies that use Varnish or Litespeed or Nginx's proxy_cache to cache pages before they hit WordPress.
I have a classified website pkwhistle.com that is leading multiple countries and has a huge collection of images media. Is there any way to store newly uploaded listing images automatically store outside WordPress and fetch back to my site. clasificadospr.com is the best example of my idea. Because this website is using service which I am actually asking about. It's using the "thumbor" service. Please help me in this matter so I can increase the speed of my website. More than 10thousand images on a website can kill speed.
Well, it's called hosting/loading your images from a CDN, and there are many providers that work nicely with Wordpress!
With 10.000 images you mostly end up with a premium solution such as WP offload Media from Deliciousbrains (highly recommended and I am not in any way affiliated to them, just love their products). They also have a free version.
You can hook it up with all the big assets storage providers (digitalOcean Spaces, Amazon's AWS)
And integration with WP is great, it syncs between the CDN and your Wordpress Library.
Alternatively, there are some free options, you can use photon from Wordpress, it does almost the same, but hosted on photon's servers. It comes with the Jetpack plugin.
Another free option is Cloudinary (they have a plugin as well). But it has a limited free plan.
Good luck!
To give you a little background, I have a website with WordPress as my content management system, which revolves around users uploading panoramic photos. The site is hosted on a small Amazon EC2 instance. After encountering a few days of noticeably slow speeds, I decided to address the issue. In following the suggestions of several speed diagnostic sites (i.e., enabling browser caching, gzip compression, and keep-alive), I was able to increase my scores substantially and speed over basic site usage. Unfortunately the site remains incredibly slow when uploading files as panoramic photos tend to be large in nature. When a user uploads a file, a new post is created with a resized version of the panoramic image, and once complete, the user is redirected to the new URL. Does anyone have any suggestions to expedite this process? Are there any options besides upgrading my server?
The following plugin does exactly that:
Dynamic Image Resizer
Changes the way WordPress creates images to make it generate the images only when they are actually used somewhere, on the fly. Images created thusly will be saved in the normal upload directories, for later fast sending by the webserver. The result is that space is saved (since images are only created when needed), and uploading images is much faster (since it's not generating the images on upload anymore).
The author is WordPress core developer and knows WP code inside out.
I've had to migrate many Wordpress web sites from different domains on the same server to different domains on different servers. In few cases, a simple export was sufficient. In many cases, an import failed to load the media correctly and I was forced to use a common work around.
Workaround (for those wondering):
I download from the original site and upload to the new site the uploads folder where my media is stored via FTP. Once this transfer is complete, I use the plugin Add From Server to select each individual image, one directory at a time.
This is the best workaround I've found, but it's hardly efficient. It's incredibly time consuming and stressful on your bandwidth.
If you have any better suggestions, I'm all ears. But primarily, I want to know the "Why" to this question. What causes Wordpress to have such a hard time managing media migration while migrating posts, pages, and users are much less of a headache?
There is an excellent tool that certainly eases Wordpress migration WordPress (and others) Search and Replace Tool. With that tool it's easy to search through the entire database for all occurrences of old domain, and replace that with the name of new domain. After replacement all the pictures and widgets should work properly.
The way I'm moving WordPress:
export and import the database with phpMyAdmin
transfer the files with FTP program like FileZilla
edit the wp-config.php settings for a new domain
search and replace on the database with InterconnectIT Search and
Replace Tool
I'm working on a online file library for one of my clients. It's a library for mostly PDFs and office documents. Because they are a huge amount(almost 2gb in files), I'm hosting them on another site(divshare), so that the hosting account we have doesn't get blocked by the excess of files, and also because of excess traffic downloading can generate.
So, my question is if there is a good download manager(even with some search for download categories and so) that can handle instead of local uploaded files, URLs of files hosted somewhere else?
The advice about any plugin or the like is very appreciated.
You ask how to code such manager, right? Otherwise, your are on the wrong site...
I think you need to make a kind of file manager, except that instead of generating HTML pages to view the files and act on them, it exposes a Web API, returning XML or Json data, that a WordPress plugin can manage.
From Divshare:
The DivShare Uploader Plugin for Wordpress replaces your regular
uploading frame with a DivShare upload form, allowing you to easily
upload and add files without ever leaving your "Write a Post" page.
It's a great way to speed up your blogging and take the load off your
servers when hosting big files and images.
It can be found here: http://www.divshare.com/integrate
Good Luck!
Marcelous