Home > Article > CMS Tutorial > Simplifying WordPress: A beginner's guide to maintaining a lightweight website
As I explained in my last article, the web is quickly becoming overrun with sites that are too big for their own good. That said, in many cases optimization is an afterthought.
As a result, we are now limited to sites that have a lot of resources such as scripts, stylesheets, web fonts, and images. We shouldn't settle for less, as always, a better world (or web in this case) starts with our own servers.
In this article, I will detail some of the more important aspects of creating a website, aiming to help you avoid making some of the most common mistakes.
Whether you have an existing website or are planning to build a new one, it's always important to have a clear idea of where your website is going and what you plan to do with it.
For example, you might want to add some functionality to an existing website, but have you ever thought about what this really requires?
Suppose you want to add a banner slider to your website. It's easy to do, right? Just find a plugin and that’s it! Carpe diem; however, did you notice that the Banner Slider simply adds a stylesheet, web fonts, and two scripts to your website?
Also, did you notice that another plugin of yours - you know, the one that adds social buttons to your posts - also adds stylesheets and scripts? Installing plugins is quick and easy, but your site may slow down every time you add a plugin.
So, let’s take a closer look at all the bells and whistles we add to our WordPress installation, shall we?
One of the most important things to do before doing anything is to spend some time thinking about what you want to do.
For example, let's say you want to add a banner to your homepage - great. I like banners. But if you're going to do it, try to do it the right way. Find one that best suits your needs and continues to keep a small footprint. The fewer resources a plugin adds to your website, the faster your website will perform.
In this example, I used a plugin, but the same applies to using a theme, whether free or paid. Generally speaking, the more "premium" a theme is, the more features it has, and while features are great, they do have overhead, and that overhead can slow down your site.
Maybe you should spend some time thinking about what they do for your site instead of blatantly installing every plugin you can find.
When you do this, you may find that you can make better choices. I'm not saying don't use plugins, or don't use to insert your plugins here. On the contrary, I Says to think about the plugin before clicking "Install".
Don't add them just because they bring small improvements to your site, they may cause more harm than good.
It’s a popular slogan, “less is more,” but these things don’t become popular for no reason. We want the site to be smaller: less time downloading images, less code, less files, less everything.
Ideally, we want the website to be as streamlined as possible so that we can get the performance and functionality we need with as few additions as possible. The thing is, fixing this problem takes time, but it's worth it in the long run. For every kilobyte less, one less kilobyte needs to be transmitted.
So remember: make the right choice. Focus on figuring out whether you actually need the plugin or feature. Consider what you can do to avoid adding it to your website, thereby significantly increasing your overhead. Consider adding the functionality directly to your theme, or building a plugin that does exactly what you need and nothing more.
In the next article, I’ll cover some tips on how to clean up your existing theme and get rid of some of its bloat.
The above is the detailed content of Simplifying WordPress: A beginner's guide to maintaining a lightweight website. For more information, please follow other related articles on the PHP Chinese website!