• Good afternoon,

    We are developing a WordPress website at the moment that first used a lot of CPT. Now not anymore and we like to add redirections for those links. We wrote a script to automatically change those things (600+ records). Everything is fine so far. We do an INSERT query into wp_redirection_items. Everything fine there. We use the Redirection plugin to handle our redirections.

    Only we do have a problem. We don’t run a private server but a hosted one with this website. We have 600-700 redirection records in the table at the moment. The funny thing is when the permalinks get flushed the Redirection plugin is doing an INSERT INTO wp_options query. This way WP knows how and when to redirect eventually. Very nice.

    Only our server isn’t executing the query. The query itself is 2,5MB. We can’t handle that kind of queries.

    Our question is. Is there a fix or work around for this kind of issues? We can imagine that the plugin can do something like:

    First time (200 records): INSERT INTO wp_options (option_name, option_value, autoload) VALUES (‘rewrite_rules’, ‘xxx’);
    >200 – <400 records: UPDATE wp_options SET option_value = option_value + ‘xxx’ WHERE option_name = ‘rewrite_rules’
    >400 – <600 records: UPDATE wp_options SET option_value = option_value + ‘xxx’ WHERE option_name = ‘rewrite_rules’
    etc

    This way we believe its easier to handle the DB. I hope everything we are saying is clear enough. We hope you are willing to take the time to get back to us. We would really appreciate that.

  • The topic ‘[Plugin: Redirection] Max_allowed_packet with 600 rewrites INSERT wp_options’ is closed to new replies.