How to speed up a site that has the types plugin and its options configured
There is often an opinion that wordpress is slow., but it seems to me that this myth appeared more from that, that people just don't know how to customize it or use heavyweight premium themes and plugins.
Very often, the cause of site brakes is a large number of options in which a lot of information is stored.. I am now talking about the options that developers work with through the function update_option( 'intake', ‘val’ ) save option and function echo get_option( 'intake’ ) to get an option. You can read about the functions on my website in an article about options mechanism or on the official website wordpress code.
To check the slow options, we need to enter phpmyadmin and enter a simple query in the SQL section.
1 |
SELECT option_name, LENGTH(option_value) AS length FROM wp_options WHERE autoload = 'yes' ORDER BY length DESC; |
If there are many options, you can use this query:
1 |
select option_name , length(option_value) from wp_options where length(option_value) > 100000 ORDER BY option_name |
Recently, such edits on the site were very useful when correcting the site of a friend. His site grew very quickly and showed more memory 512 mb.
By the way, who is interested in measuring the memory consumed by your site, you can use the plugin WP-Memory-Usage. The data will be displayed in the console of the admin panel.
We speed up the site and disable the autoload options of the plugin types
I have already written about the free plugin more than once types, which creates data types and its benefits. Today I found one very minor problem with a large option, which is stored in the database. The option is called wp_installer_settings, and how to solve it, I learned from the plugin community.
To disable the option wp_installer_settings need in the file wp-config.php insert constant define( “OTGS_DISABLE_AUTO_UPDATES”, true ).
That's all, stay tuned to stay up to date with new lessons. Successful website development.
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.