Support » Plugin: Wordfence Security - Firewall & Malware Scan » Wordfence cause the database can not be imported

  • I am having problems moving my website to another VPS
    Backed up database could not be imported.
    At line 178074: MySQL server has gone away
    I checked the database file, that 178074 line is
    INSERT INTO wfconfig (name, val, autoload) VALUES
    Already reported the problem but they don’t want to fix him
    Just tell you to exclude wordfence data during export/import

Viewing 1 replies (of 1 total)
  • Plugin Author WFSupport



    I’m sorry for the delay in the response last week but this isn’t necessarily something we need to “fix”. Something in your database is likely the issue. Dave’s answer in your post explains it a little better which I will include below.

    The wfconfig table is not meant to be copied over to a new machine. Wordfence provides an easy way to import/export settings within Tools. The reason is that there are many things that cannot be copied over, such as site specific paths, URLs, domain names.

    If there is an indexing issue on the database itself (which may not show that the table needs repairing), rows can be duplicated, which causes the wfconfig table is grow rapidly in size. The error message you saw, the database went away is the result of the database running out of memory.

    You can increase the memory limit within my.cnf by changing max_allowed_packet:
    For example, max_allowed_packet=200M.

    If you have something different, such as MB instead of M, MySQL will report an invalid value.

    However, the better option is to simply exclude wp_wfconfig within Updraft plus.
    There’s a guide here to do so that Updraft provides: (edited)

    I’m fairly certain that changing the my.cnf will solve your issue, but you should also make sure that the table hasn’t grown big due to another issue with the database just to be sure.


Viewing 1 replies (of 1 total)
  • The topic ‘Wordfence cause the database can not be imported’ is closed to new replies.