Title: Plugin Database Error
Last modified: February 17, 2018

---

# Plugin Database Error

 *  Resolved [tekhnologica](https://wordpress.org/support/users/tekhnologica/)
 * (@tekhnologica)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/plugin-database-error/)
 * Hi,
 * I recently migrated my site to a new server and everything is running fine except
   for this plugin. When trying to view folders through the plugin, WordPress hangs
   and then the following error is repeated over and over (with debug enabled):
 * [17-Feb-2018 21:26:33 UTC] WordPress database error You have an error in your
   SQL syntax; check the manual that corresponds to your MySQL server version for
   the right syntax to use near ” at line 4 for query
    select post_title, ID, mgmlp_folders.
   folder_id from dposts LEFT JOIN dmgmlp_folders ON(posts.ID = mgmlp_folders.post_id)
   where ID = made by do_action(‘toplevel_page_media-library-folders’), WP_Hook-
   >do_action, WP_Hook->apply_filters, MaxGalleriaMediaLib->media_library, MaxGalleriaMediaLib-
   >get_parents
 * Any idea what might be going on?

Viewing 1 replies (of 1 total)

 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/plugin-database-error/#post-9987691)
 * After migrating your site, it may be a good idea to reset and scan the Media 
   Library Folders folder data. After migrating your site, did you use something
   like the Better Search and Replace plugin to update all the URLs in your database?
 * If not I would suggest
 * 1. Backup up your current database
    2. Deactivate Media Library Folders, activate
   Media Library Folders Reset and run the Database Reset option to remove folder
   data from the database. Files and folders on your server are not affected by 
   this action 3. Install, activate and run Better Search and Replace. Check the
   option to update guid fields and uncheck the dry run option. Also in the change
   from and change to fields do not include the ‘[http://&#8217](http://&#8217);
   or ‘[https://&#8217](https://&#8217); part of the URL. Otherwise these will be
   repeated (‘[http://http://&#8217](http://http://&#8217);). 4, Update your permalinks.
   5. Verify that your site is working correctly. 6. Activate Media Library Folders
   which will do a fresh scan of the items in your media library. Now check if this
   error is still occurring.

Viewing 1 replies (of 1 total)

The topic ‘Plugin Database Error’ is closed to new replies.

 * ![](https://ps.w.org/media-library-plus/assets/icon-128x128.jpg?rev=1814048)
 * [Media Library Folders](https://wordpress.org/plugins/media-library-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-plus/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * 1 reply
 * 2 participants
 * Last reply from: [AlanP57](https://wordpress.org/support/users/alanp57/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/plugin-database-error/#post-9987691)
 * Status: resolved