Home >CMS Tutorial >WordPress >Why is WordPress so slow?
I think there are three main reasons:
1. WordPress is a procedural structure
Wordpress has existed in the PHP5 era and is a very typical example. BLOG. OOP is not popular from PHP4 to PHP5, and process structure is the mainstream. But now PHP5.6 to PHP7 are obviously optimized for OOP, and WordPress is still an old structure, and the new environment has not brought good optimization effects to WordPress.
2. The plugin mechanism of wordpress is HOOK
Hook is a hook, which means placing a slot in the program. In the future, other programs can establish hooks to associate with it to achieve code injection expansion. This is done to achieve flexible scalability. WordPress can install very powerful plugins precisely because it has hooks. But hooks are added to the entire loading process. For example, if you install a plugin only to achieve a small effect on a certain page, the plugin will still be loaded on other pages. If you have 100 plugins installed, then when you open a page, all 100 plugins may be loaded before the page is opened.
3. Wordpress is actually a BLOG
Wordpress was initially just a blog, a simple blog, but as more people use it, they have various requirements. Many people regard it as a CMS, trying to add many types and optimize content performance capabilities, so developers continue to use hooks to strengthen and strengthen the blog. In the end, the blog is quite bloated, and the consequence is slowness.
Wordpress is easy to use, but it is old. Although it is constantly being upgraded, the core architecture has not changed. Because its core has not changed, it has good support for old plugins and is becoming more and more powerful in the end. But the core is still a flaw, and there will still be a day when it will come to an end.
For more wordpress related technical articles, please visit the wordpress tutorial column to learn!
The above is the detailed content of Why is WordPress so slow?. For more information, please follow other related articles on the PHP Chinese website!