Skip to main content

An error occurred while updating Ghost Kit PRO: Could not create directory.

If you know that your Ghost Kit PRO license is active, and when you try to update Ghost Kit PRO using the standard WordPress plugin update method but you’re met with an error that states:

An error occurred while updating Ghost Kit PRO: Could not create directory. ghostkit-pro/assets

There is a fix available! For some background on the issue: Ghost Kit’s update process uses signed URLs (to make the update more secure) which involves generation of a long string that’s used as the filename during the update process.

There is a limitation of the Windows operating system that prevents a file path from extending beyond a certain number of characters (250 or so) and Ghost Kit’s signed update URLs can exceed this limit. This is what causes the “could not create directory” error message to appear.

It is possible to work around this issue, but it involves installing a Must Use Plugin. Must Use Plugins are different than Plugins in that they’re loaded first and they also require a manual installation.

This process needs to happen only once, but once it does your Ghost Kit PRO updates should operate as expected.

You will need to create a new file within your /wp-content/mu-plugins folder. If this folder doesn’t exist you must create it.

You can name the new file ghostkit-pro-windows-compat.php and save the following contents in that file:

Once that file is saved, the Must Use Plugin will be active, and it will essentially truncate the long signed URL to be something that Windows servers can manage.

Please note: this truncation will happen for Ghost Kit PRO and any other plugins you’re using that are updated using Easy Digital Downloads Software Licensing solution. This is a popular platform for many WordPress products and it should not interfere in any way, but it needs to be noted.

Was this page helpful?