Parte 3: Growing & Making Money
3.1 Performance
Mantenha o seu site rápido - os seres humanos e os motores de busca não gostam de esperar
3.1.1 Minimise plugins
Throughout this article we’ve recommended lots of plugins. They’re all valuable and can add to your site. However, don’t go over the top. Each and every plugin that changes your site appearance adds processing and transfer overheads. Plugins that are for management use only (e.g. de backup plu-gins) are of much less issue. Wherever possible, usar um tema que inclui a funcionalidade, ou soluções de imple-mento sem plu-gins, por exemplo, instead of using the “external links” plugin to apply style your external links, simplesmente implementar esta denominar-se com um pouco de CSS and an image or 2. Try to keep a sensible balance — don’t remove valuable plugins just to keep the number of plugins low, mas não mantenha aqueles que você realmente não precisa tanto.
3.1.2 Remover plugins não utilizados
This is simple — if you’re not using a plugin then don’t waste hosting space on them. Unless you think you might want to reactivate a plugin in the future don’t just deactivate, but delete. Removing unneeded plugins also keeps your wordpress management page less cluttered.
3.1.3 Substitua plugins
Alguns plugins são muito grandes e têm uma série de características, but you might only use one feature of such a huge plugin. Consider manually adding the code for that feature and ditching the overhead of the whole plugin (ver secção 3.1.1) or consider finding an alternative plugin which offers just the features that you need.
3.1.4 Esconderijo & Apoucar
Palavra-Press é baseada em PHP e MySQL, and both of these require significant processing whenever a page is accessed. Since neither users nor search engines like waiting for pages to load you should reduce load times by utilising various caching and efficiency plugins. Caching generates static HTML arquivos para cada uma de suas páginas, reducing the delay caused by your web server processing PHP and accessing the database. Minifying removes redundancy from your CSS and JavaScript. The 2 levar-ING soluções de são W3 Total Cache, que faz as duas coisas cache e minifying ou uma combinação de WP Super Cache e WP Minify.
[google_adsense]
3.1.5 Compressão
Your hosting will almost certainly be running on either the Microsoft of the Apache web server. Our host uses Apache, que suporta a compressão de todos os dados que envia, if you choose to enable it. The Microsoft web server also supports compression which can simply be turned on or off. All modern web browsers support compression. There are 2 maneiras de dados com-pres-são com Apache, and you may only want to compress certain files. Here at DIYMH we compress all our text based files using apache’s mod_deflate. This reduces our front page load size from approx 100k to approx 20k! Depending on your web host you may only be able to enable some types of compression. BetterExplained have an guia de exce-lente para com-pres-são which we recommend you read.
3.1.5 Keep scripts in files
All non content really should be in external files, linha não carregado. This speeds up browser rendering significantly and also makes debugging any page errors easier. JavaScript should be in js files, Esti-ção deve estar em CSS files etc. Even some meta content can go in external files (por exemplo, ver SEC-ções 1.4.3 e 1.4.17). WordPress is very good at keeping to this, but if you make modifications try to stick to the system. Some wordpress plugins are better than others at this, por isso, se alguns não são até zero, con-sider-ing encontrar uma alternativa.
3.1.6 Uso CSS Sprites
CSS sprites são uma excelente maneira de reduzir o número de HTTP requests sent back and forth between the readers browser and your web server. Instead of having 30 individual images, que tudo tem que ser reques-ted setembro-ar-diatamente, you can reduce the number of requests to the server by having all of images in a single file. Use CSS to insert the correct part of the image each time you want to use it. Another benefit is that 1 large image file is often smaller than several small images combined. There is more information at CSSTricks, W3Schools e Smash-ing-Ma-gás-ine
3.1.7 Compress images
By default lots of images can be losslessly compressed better than wordpress does by default. This will save on image transfer times. There are plugins that will do this for you, e.g. WP Smush.it. If you’re using PNGs (como reco-men-ded na sec-ção 2.1.2) then there are several ways to improve efficiency. To maximise PNG imagens de eficiência pode ser compactado com PNGGauntlet, no entanto isso deve ser feito depois upload. If the image doesn’t contain many shades or colours then save it as a 256-colour image — this will reduce the file-size significantly, mas novamente, this efficiency should be sought after upload. The reason for not compressing or reducing the colour depth of images before upload is that the PHP resize function will not create good quality resized images if they are already compressed. So, upload de suas imagens, deixar wordpress gerou as imagens redimensionadas, down-carregá-los com um FTP pro-grama, com-pressioná-los com PNG-Gaunt-let, and then reupload and over-write the originals. WP Smush.it vai chegar 90% do caminho e é muito mais con-veni-ent. Nós sempre recompactar nossos PNGs localmente com PNGGauntlet, but you may not want the hassle — the choice is yours.
3.1.8 Set expiration of static resources
Browsers cache all the content that they load. To avoid images and other static resources being reloaded on every page load you can specify an expiry time which instructs the browser to use its cached copy until the expiry date passes, when it will fetch a fresh copy. Anything that doesn’t change very often should have an expiry set. At DIYMH we do this via W3 Total Cache.
3.1.9 Use relative links
Se você inserir qualquer relação com qualquer outra coisa em seu site sempre usar um caminho relativo, em vez de um percurso completo. Isso economiza um pouquinho de tamanho da página, mas mais import-antly, isso significa que você não terá que alterá-los, se você mudar o seu nome de domínio.
3.1.10 Remover revisões antigas
By default wordpress retains a copy of all previous revisions of every article on your site. This is overkill in our view. The easiest way to manage this is to use a plugin, e.g. revi-são con-trole, which will automatically cull older revisions based on your settings. This will keep your database size down and the speed of your site will benefit.
3.1.11 Check your page speed
Enquanto o Google Page Speed (ver secção 1.3.2) é um bom lugar para começar, nós recomendamos o uso de um ampla gama de ferramentas para verificar que você optim-zados seu site totalmente.
“Hi James I realise it has been a long while, but I just checked this on windows 11 (build 23H2)…”