Search is very slow

This topic contains 17 replies, has 2 voices, and was last updated by

6 years, 10 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
  • #4010


    Could you plz have a look, why the search is that SLOW. Try to type “Riesling”, “merlot”, “muttertag”, “sekt”. Sometimes it seem to be hung up completly as it searchs and searchs and searchs…

    • This topic was modified 6 years, 10 months ago by  Richi400.


    Could you please provide more information on this:

    • An url where the search is visible
    • Temporary admin and ftp details if possible (you can edit your initial post for this)
    • What is the database size? How much posts/pages/custom content do you have?
    • Are you running on a Virtual Private Server or a Shared web hosting? What is the server configuration?
    • What type of content are you searching?
    • Have you tried changin anything on the search options page?
    • What is your site response speed if you test it on:

    Thank you!

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    Hi there!

    Ok, seems that the search works most of the time properly. But sometimes, especially the search while typing is very slow. Also in some cases when I typed a phrase and hit enter I get an internal server error.
    You could have a try here: (product search)
    and here: (search products, pages and posts)

    Strange, I provided the admin and ftp-details allready in my initial post, obviously it’s gone. :/

    – The database size is 7.3MB. There are about 7 products and 21 published posts, only. (Will be over 100 posts after finishing the website construction)
    – It’s a shared web hosting
    – type of content: products, posts, pages
    – I tried to use the cache system, but it was producing a lot of bugs, so I deactivated it again, I also tried fulltext search options but it did not change anything
    – response speed test:
    Tested from New York City: 7.25s, 7.10s (86/100 perf. grade)
    Tested from Amsterdam: 2.64s, 2.18s, 3.35s (88/100)

    And one last question: How could I determine a custom search page. I don’t want to use the default one. I allready checked the box override default wordpress search-page. ans created a new page. But if I set the redirect URL to a custom page like /suche?s={phrase} I get a 404 error although the page exists.
    Do I have to copy the search.php and customize it?

    thank you!



    Sorry about the ftp/admin details, it was my fault – I was fixing something on the server and forgot to activate that code part back.

    I’m currently testing, right now it’s all right in terms of speed – response under 2-3 seconds.

    Your database is all right, it’s small.

    The problem might have been the shared web hosting. Most of shared web hosts use process throttling, meaning if too many php processes are running at the same time it halts the server for a brief amount of time (usually 30 seconds). The limit used to be around 10-20 processes, which is enough for cached traffic usually. But if you are actively testing your site, enabling/disabling plugins, changing configurations, then this limit is passed in few seconds, and the PHP processor is halted. WordPress with some plugins and active testing on the backend uses lots of resources.

    Another possibility would be memory, but the search plugin peaks at 0.5 MB of memory, so I think we can rule that out.

    I might be wrong though, but the nature of the issue indicates process throttling.

    On the search url: It’s not actually changing the url (because it can’t unfortunately), but it gives you an option to change it if you already have a custom search url.
    To have a custom search url, you probably have to make changes to the .htaccess file. I’ve found a tutorial, that might help you out:
    After making the changes in the .htaccess file, you can go back to the search settings, and change the search url field accordingly.

    I know it’s a bit confusing, but I wish there was a better way around this.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    All right! Thanks a lot for this helpful comment. I think you’re right with your assumption of php-process throttling. The site will be hosted on a dedicated server when I finished work on it. So the problem should be gone.

    And thanks for the tutorial-link. I will figure it out.


    No problem at all!

    Let me know if the issue persists on the dedicated server, and I will investigate further if needed.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    I could change the URL, but it will show 404 still.
    OK, it’s obviously that it is unpossible to change the redirect from wordpress to an other page than search.php as template. Crazy! But ok…

    New problem:

    I have some product categories like “Weißwein”, “Rosé” and “Rotwein”. When I search for Weißwein it’s allright. “Weisswein” is not working. (Maybe because the titel is written “weißwein” with the german “ß” and not “weisswein”)
    BUT: Please try to type “Rotwein”… the search will start and will never finish with a result, although the title is “Rotwein”. This is a bad bug. Have no idea why?

    thanks in advance!



    The described problem still exists.

    But now there is another problem. The Ajax Search jquery.ajaxsearchpro.min.js?ver=4.1.1 is in conflict with my jquery.rwdImageMaps.js?ver=4.1.1. The Link-Map calculation for responsive (resizing) images doesn’t work if Ajax Pro Search is activated. 🙁

    Any idea?


    Let me check that for you.

    In the meantime, could you please link me to that map issue with some explanation, I will check that as well.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    After some experimenting I have found the cause of the problem.

    There was this image, which is a bit too big:

    The search calls the wordpress image library to try to create a smaller crop of the image, but because of the size and type (2.2 MB, png) of the image the PHP memory runs out. I’ve done some measurements, the memory peaks at around 100MB after wordpress is loaded before the search, and the image library tries to take around 40MB more. The problem is that the memory runs out at 128M. I highly suggest increasing the memory limit from 128MB to at least 512 in the php.ini file if you are planning to use bigger images.

    I’ve tried to switch to the image library that I built as an alternative to the wordpress core one, but still no luck – it uses somewhat less memory, but still not enough unfortunately.

    As an alternative, I can turn off the image cropping and caching, but as a result the full sized images will be shown as thumbnails in the results.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    GREAT! It solved the problem :-))
    Oh no I don’t want use such big images. It was just a try, if a 300KB JPG looks worse than a 2.2MB PNG. But theres no difference in the shop-view. So I replaced the PNG with the JPG and the search works now and is fast enough! Thanks! great!

      Map issue

    HTML image maps are one of the best ways to add multiple links to a single image. look here: (the banner above the “Shop”-Title has 4 different links) but it’s one image.
    It works, but for example if you reduce the size of your browser-window to see how it would work e.g. on tablets you see that the link-map is not calculated to fit the new resolution. To keep the link-map fit to every resolution I’ve built in the jQuery-rwdImageMaps.
    In my functions.php I used this code:

    add_action( 'wp_print_scripts', 'add_my_scripts', 100 );
    function add_my_scripts() {
    if ( !is_admin() ) {
     wp_deregister_script( 'jquery' );
     wp_register_script( 'jquery', ( '' ), false, null, true );
     wp_enqueue_script( 'jquery' );
     wp_register_script( 'jqmigrate', ( '' ), false, null, true );
     wp_enqueue_script( 'jqmigrate' );
    wp_register_script( 'rwdImageMaps', '');
    wp_enqueue_script( 'rwdImageMaps' );
    } }
    add_action('init', 'add_my_scripts');

    The HTML code for the img will look like this:

    <img src="" alt="Weine online günstig kaufen" />&lt;map id="map1425294570307" name="map1425294570307"&gt;&lt;area shape="rect" coords="0,0,285,155" title="Rotweine online günstig kaufen" alt="Rotweine online günstig kaufen" href="" target="_self"&gt;&lt;area shape="rect" coords="0,165,284,319" title="Weingut Sandwiese Wein" alt="Weingut Sandwiese Wein" href="" target="_self"&gt;&lt;area shape="rect" coords="292,0,492,318" title="Marienhof Perlwein Perlenmarie Perlenkönig" alt="Marienhof Perlwein Perlenmarie Perlenkönig" href="" target="_self"&gt;&lt;area shape="rect" coords="496,0,764,319" title="Wein zu Ostern" alt="Wein zu Ostern" href="" target="_self"&gt;&lt;/map&gt;

    or look at the html view of on line 2015

    • This reply was modified 6 years, 10 months ago by  Richi400.
    • This reply was modified 6 years, 10 months ago by  Richi400.


    Whooooo! Strange! Problem solved. The map-resizing-calculation works now! 🙂
    I’ve no idea why, but it works now! Yes!
    Did you change the javascript source in Compatibility Options?


    Yes, I actually did for testing. Well, I’m glad it solved that as well!

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    Hi there!

    I was trying to open a new thread, but is was not possible because it says “Wrong verification code, or code already in use!” no idea why. So here is my new problem:

    I’ve got a problem with my search results.
    Try to go to and for example type “kochen mit wein” or “riesling”. The groupe “other results” always shows multiple results, means the same post is displayed 2, 3 or 4 times or more.
    What could be the reason for this?

    To access the site pls use the “ftp-credentials” I have provided.

    thanks in advance!


    Indeed. Let me cross check the changes regarding this from v3.5 to 4.0.

    I will most likely log in to your site both admin and ftp to run some tests on the plugin code, the search might not work for couple of minutes in the next few hours.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.