1 | | This is due to the GUID column being VARCHAR(255) and for some reason WP is using the full generated URL of an uploaded/imported media file as the GUID in the GUID column. |
2 | | |
3 | | For example, if you upload a new media file named `01234567890.jpg`, WP stores the following in the GUID column: `https://<domain>/wp-content/uploads/<somepath>/01234567890.jpg`. If the filename is long enough, it breaks the 255 limit. |
4 | | |
5 | | Ideally, the value used for the GUID column should NOT be using the full constructed URL but rather a unique ID (example, a hash of the URL). |