• paullee357

    (@paullee357)


    I’m tying to track the issue where I have another app create a well formed HTML table from a folder structure. Avg is about 3,000 lines of HTML and I copy and paste into a WP Post and it behaves wonderfully.

    However one table has about 60,000 lines of code in creating an HTML table and when I copy/paste into the post the server just drags, locks up and sometimes dies. I have to restore the entire server.

    Is there a MySQL limitation, PHP, WP?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you really want to display 60k lines on your webpage?

    Thread Starter paullee357

    (@paullee357)

    I’m splitting up for that very reason, but I’m still curious as to the choke point. I’m trying to insert directly into wp_posts.post_content via phpmayadmin and that chokes as well. So not a WordPress limit.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does the act of pasting it in choke it? That may suggest that it’s your computer with the issue. Or does it choke when phpmyadmin is processing the request?

    Jason King

    (@jasoncharlesstuartking)

    Maybe put the code into a “PHP include” instead, and use a shortcode to load it into the page. That way, the Editor shouldn’t crash.

    Thread Starter paullee357

    (@paullee357)

    I eventually wrote a SQL statement to update directly and that choked as well. There is a MySQL config setting called max_allowed_packet and I adjusted from 4M to 256M. That helped a little. I’ll consider the choke point at that level then since I bypassed WP and PHP

    Thread Starter paullee357

    (@paullee357)

    @jason King, tell me more about the PHP include and shortcode. I have an app that converts data into an html table and that sits in an TXT file ready for me to manually copy and paste into wordpress. I would love to bypass the WP editor and have post_content pull from that TXT file.

    Jason King

    (@jasoncharlesstuartking)

    Put the html code in a file called whatever.php and upload it using FTP.

    The following code could be used in a template:
    <?php include('https://www.yourdomain.com/wherever/whatever.php'); ?>

    But that won’t work within a post, because you can’t run PHP from within the post editor.

    You can get round this by:

    a) using a plugin that enables php within posts such as Insert PHP

    b) or create a shortcode, see https://www.sitepoint.com/how-to-develop-a-php-file-include-plugin-for-wordpress/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Server crashes when copy/pasting >60k lines of html into post’ is closed to new replies.