I am planning to use External Media Without Import
plugin which, like any existing media, uses the guid column of the post table to store the URL of the media (ex: jpg etc). My DB has this column defined as VARCHAR(255) which is not enough for some HTTP URLs.
Any drawback in increasing to VARCHAR(2048)? Any alternative to make this work without altering the DB?
Note: as pointed by Tom below, this is a really a limitation of that plugin which should use some other means of storing the external URL...
I am planning to use External Media Without Import
plugin which, like any existing media, uses the guid column of the post table to store the URL of the media (ex: jpg etc). My DB has this column defined as VARCHAR(255) which is not enough for some HTTP URLs.
Any drawback in increasing to VARCHAR(2048)? Any alternative to make this work without altering the DB?
Note: as pointed by Tom below, this is a really a limitation of that plugin which should use some other means of storing the external URL...
Share Improve this question edited Apr 12, 2020 at 22:53 Bruno asked Apr 12, 2020 at 13:30 BrunoBruno 1013 bronze badges 1- Note that if you achieve this, WordPress will undo the change when the next core schema update happens, usually when updating WordPress. The plugin you mention doesn't need to use the GUID to store the data. You should contact their support as the inability to store long URLs is a bug in the plugin, 3rd party plugin dev support is off topic here and not in this stacks scope – Tom J Nowell ♦ Commented Apr 12, 2020 at 14:14
1 Answer
Reset to default 3No, it is not safe to resize columns in WP core tables, or to alter them.
When you next update WordPress, the update process will alter the tables to the official table schema, truncating all your GUIDs and breaking them.
Instead, you need to contact the support route for the plugin so that they can fix this. They shouldn't be reusing GUIDs to store URLs if the URLs are going to be long. This is a bug in the plugin.
Edit: There's a ticket on Core Trac related to this, reproducing and posting that you can replicate it and it affects you will help, as will watching/starring it https://core.trac.wordpress/ticket/47296