• In each edit post page in the right bar I have a large number of custom taxonomies and each has various options inside it, when I open the edit post page it takes more than 10 seconds before the taxonomy boxes open, is there any way to speed up the process?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello @sacconi ,

    To speed up the opening of custom taxonomies on your edit post pages, you can consider the following optimizations:

    1. Reduce the Number of Taxonomies: If possible, minimize the number of custom taxonomies loaded at one time.
    2. Optimize Database Queries: Ensure that your taxonomy queries are efficient. Using a caching plugin or optimizing database queries can significantly reduce load times.
    3. Asynchronous Loading: Implement asynchronous loading for your taxonomy boxes so they don’t block the loading of other elements on the page.
    4. Use AJAX: Load the content of taxonomy boxes via AJAX only when they are accessed. This will decrease the initial load time of your edit pages.
    Thread Starter sacconi

    (@sacconi)

    hello, the edit post page opens quickly, it’s just the custom taxonomies boxes that take up to 30 sec. to open and let me see all the taxonomy options

    Hello @sacconi

    Thanks for sharing the details. Since your edit post page opens quickly but the custom taxonomies are taking longer to load, it might be helpful to investigate the specific queries being executed. I recommend using the Query Monitor plugin, which can help you debug and analyze the database queries related to your custom taxonomies.

    You can download it here: Query Monitor. Make sure to check and debug thoroughly to identify any bottlenecks.

    Thread Starter sacconi

    (@sacconi)

    hello. I already have Query Monitor, I get one php error when loading the edit post page:

    Constant WPCACHEHOME already defined

    1. wp-config.php:13

    1Core di WordPress

    @sacconi

    • Check the wp-config.php File: // define('WPCACHEHOME', '/path/to/wp-content/plugins/wp-super-cache/');
    • Reinstall/Update the Caching Plugin
    Thread Starter sacconi

    (@sacconi)

    Maybe it’s a good idea putting all the taxonomies code in a custom plug-in instead than keeping it in functions.php? The execution should be before than the core of wordpress…

    • This reply was modified 3 months, 1 week ago by sacconi.

    @sacconi

    Yes, placing all your custom taxonomies code in a custom plugin instead of functions.php can be a good idea.

    Benefits of Using a Custom Plugin :

    Portability:

    • If you switch themes, the custom taxonomies will still be available since they are part of the plugin, not tied to a specific theme.

    Organization:

    • It keeps your theme files clean and focused on design, while the plugin handles functionality.

    Modularity:

    • You can easily disable, update, or reuse the plugin across multiple sites without affecting the theme.

    Priority in Execution:

    • Plugins generally load before the theme functions, which ensures that your taxonomies are registered early in the WordPress load order. This is important if other parts of your code or other plugins depend on these taxonomies being available.
    • Execution Order Consideration:
      WordPress loads plugins first, then the theme’s functions.php, and finally executes the core functionalities. By placing the taxonomies in a plugin, you ensure they are registered before the theme’s core logic is executed.
    • This reply was modified 3 months, 1 week ago by beaubhavik.
    Thread Starter sacconi

    (@sacconi)

    I tryed with one custom taxonomy but it’s not loaded before the others, all the taxonomies show their check-boxes and items after 25-30 sec after the page is loaded, so it’s a lot of time

    beaubhavik

    (@beaubhavik)

    So, need to debug step by step.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.