-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Bug Report: Freemius SDK Fails to Load Styles When Plugin Is Symlinked
Summary:
When using the Freemius WordPress SDK with a plugin that is symlinked (instead of being physically located inside the wp-content/plugins directory), asset URLs for SDK styles are incorrectly resolved — causing CSS files not to load in the WordPress admin.
Steps to Reproduce
-
Create a WordPress plugin outside the WordPress installation directory (e.g.,
~/dev/plugin). -
Initialize Freemius in the plugin as usual.
-
Create a symbolic link from your plugin directory into
wp-content/plugins:ln -s ~/dev/plugin /path/to/wordpress/wp-content/plugins/my-plugin # Notice the different names
-
Activate the plugin in WordPress.
-
Open the WordPress admin area where Freemius styles should load. (Plugins page)
Expected Behavior
Freemius SDK assets (CSS/JS) should load correctly using URLs relative to the site’s wp-content/plugins path, even when the plugin directory is a symbolic link.
Actual Behavior
The asset URLs are generated incorrectly, resolving to an invalid path that includes the absolute file system path of the symlinked plugin.
Examples of generated URLs:
-
<wordpress-url>/wp-content/themes/<absolute path of plugin_dir>/vendor/freemius/wordpress-sdk/assets/css/admin/optout.css?ver=6.8.3 -
<wordpress-url>/wp-content/themes/<absolute path of plugin_dir>/vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css?ver=6.8.3 -
<wordpress-url>/wp-content/themes/<absolute path of plugin_dir>/vendor/freemius/wordpress-sdk/assets/css/admin/common.css?ver=6.8.3
As a result, these CSS files fail to load.
Environment
- WordPress Version: 6.8.3
- Freemius SDK Version: 2.12
- PHP Version: 8.4.5
- Operating System: Ubuntu 25.04
- Plugin Structure: Symlinked from outside WordPress root
Plugin
- Name: WP Table Builder
- Slug: wp-table-builder
- Freemius ID: 6984