Premium wordpress theme optimization, admin stopped slowing down

Often my subscribers write about, that they need to optimize a wordpress theme that they bought online or downloaded freely. Here is my friend acquiring another topic on a popular foreign marketplace ThemeForest got a good but very overloaded theme, in which most of the functionality he did not need. His website has been up and running for a long time., more 2 years and the time has come when a friend just got tired of working with the brakes on a seemingly very simple topic. As a friend, I decided to clean up his topic and at the same time add a new article to my blog. As it turned out, a fairly simple task in his topic was for an experienced developer, but it took time.

What had to be cleaned in the template

  1. The theme was built in a lot of plugins that were not used but created tables in the database.
  2. It was noticed that a lot of extra pictures were created in the uploads folder
  3. The theme created data types that were displayed as separate menus in the admin panel, it was both inconvenient and additionally loaded the work of the admin panel.
  4. For types like portfolio, clients and tasks that were not used the theme created metaboxes and custom fields.
  5. When installing the theme, options were imported for everything that it can do, but most of the settings were never used, hence the junk in the database.

Since the site is not new, then there are a lot of materials on it, and they couldn't be lost.. In order not to violate the integrity of the site and remove the inhibition, I made a copy of the files of the entire site and database (a copy must be made in any case, sides in the work done may appear much later than the changes).

Further using the program total comander I found all the files that contained text add_theme_support or add_image_size. Then I looked at what kind of images are created using these functions and commented out the extra ones. My actions led to the fact that the CMS stopped generating extra pictures on the server, in the future, this could reduce the consumption of hosting space by 30%. Agree, not a little for sites that are constantly developing! Portfolio pictures included in the number of extra images, the store, the forum, social network (this is all that was not used on the site but could interfere with the fast work of the CMS).

Removing redundant parts of a theme

Since deleting pictures, I found that the topic was a forum, social network and shop, then this data should be deleted. To delete the store, I simply deleted the folder in the root of the theme woocommerce, to delete a forum, deleted folder bbpress, also to delete the social network i deleted the folder budipress. The code has become smaller, but there are extra tables in the database, which means that our database also had a bunch of information that was not used, but more on that later.

The next step I removed unnecessary data types, to find them I also used the program search total comander, searched for sections of code where there are mentions register_post_type. Having found the code that defined new data types, I commented it out. further on the same principle with the help of the program I found update_post_meta, add_meta_box, get_post_meta, add_post_meta. Having found these sections, I was able to remove unnecessary metaboxes and code that defined additional options for unnecessary data types.. I wrote down the names of the options that needed to be cleaned in the database for the future. Writing down everything that I cleaned, a database cleanup plan was formed.

Database cleaning

Having a clear work plan, I started cleaning the database and started with a large. First I deleted the store tables, forum and social networks it took minutes 5 while I dug up the necessary tables from the Internet. For you, I will post a list of tables that relate to social network plugins and woocommerce. Be careful not to delete extra tables.

List of woocommerce store tables that I removed

  • woocommerce_attribute_taxonomies
  • woocommerce_termmeta
  • woocommerce_downloadable_product_permissions
  • woocommerce_order_itemmeta
  • woocommerce_tax_rates
  • woocommerce_tax_rate_locations

List of BuddyPress social network tables that I deleted

I deleted all tables that start like this [$table_prefix]_bp_, wordpress prefix and BuddyPress tables prefix.

On the official BuddyPress website, I found a detailed diagram of their tables, which helped me a lot.

BuddyPress tables diagram

As it turned out, the bbpress forum plugin had no tables in the database, apparently he used wordpress tables or the theme did not add them in the standard installation, without plugin installation.

Removing redundant options

My next step was to remove extra options in the database, as many of them can seriously slow down the site, and we just don’t need extra garbage in the database.

To remove the BuddyPress social plugin options, I had to log in to phpmyadmin and open the spreadsheet wp_options, where all WordPress CMS options are stored, themes and third-party plugins. BuddyPress options start with a special prefix bp_ or bp-, they can be found in our table wp_options in a column option_name.

To remove the WooCommerce and BuddyPress options, I used the standard phpmyadmin search as shown in the pictures below.

remove option woocommerce

Carefully review the options found and make sure that among them there are only those that relate to the WooCommerce plugin and do not affect your theme or other plugins, if you are not sure, look on the Internet or just do not touch. You can then remove them.

wordpress options delete

Acceleration by cleaning the junk on the site

You can also use the plugin to speed up the old site WP-Optimize, it cleans the database of old comments very well, post and page revisions. In general, the plugin can do a lot of different useful things and I think it would be right to just give a link to it, and you look at it. Since the information that I will post may not be relevant at the time of reading the article, most importantly do not forget to make a copy of the site, so you don't have to redo it all over again..

That's probably all. The article is certainly not for beginners, but I think for those who have been working with the engine for a long time it will be interesting. My first experience of such a cleaning of the topic was a success with a bang, the site admin panel stopped slowing down due to overload with unnecessary data and scripts.

If anyone has any other ideas for cleaning the theme and speeding up the site, write in the comments.. I will be happy to test all your ideas and unsubscribe in the article.! Let's collect together useful materials on speeding up wordpress and cleaning premium themes.

Good luck to everyone in speeding up your sites. If you don't know how to speed up, write it down. I will work for you.

Write:
  • Skype: maxix2009
  • Mail: info@wp-admin.com.ua

Buy WordPress hosting
/* WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

1 Response

  1. timsy2kuck says:

    Wow, great, I will definitely do the same with my admin panel!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal