• I have a private with my own update server, up until recently all has been great and I could update it via WordPress dashboard, but now after updating WordPress changes the plugin folder name.
    Take this simple plugin as an example (all it does is to trigger an update for itself)
    I run the update, it does everything and after it’s done I find the folder name for the plugin is private-plugin-X2HS23 instead of just private-plugin.
    It doesn’t look like something is wrong with the data I inject into the update transient since other plugins from the WordPress repository look the same. for example here is Akismet:

    [akismet/akismet.php] => stdClass Object
                    (
                        [id] => 15
                        [slug] => akismet
                        [plugin] => akismet/akismet.php
                        [new_version] => 3.1.11
                        [url] => https://www.ads-software.com/plugins/akismet/
                        [package] => https://downloads.www.ads-software.com/plugin/akismet.3.1.11.zip
                        [tested] => 4.5.2
                        [compatibility] => stdClass Object
                            (
                                [scalar] => stdClass Object
                                    (
                                        [scalar] =>
                                    )
    
                            )
    
                    )

    Any ideas what might have changed in the recent WordPress versions that could cause something like that? I think it started since 4.5

Viewing 1 replies (of 1 total)
  • Thread Starter Ilan Firsov

    (@ilanf)

    Just found a solution if someone finds this post later down the line.
    Apparently it’s not something that changed in WordPress but rather in how I packaged the plugin.

    When packaging the plugin make sure inside the zip archive you have a folder, not just the plugin files. It looks like when there are files inside the archive WordPress leaves the temporary folder as is, but if you have only one folder inside (which contains the plugin files) then WordPress will move that folder up one level to the wp-content/plugins directory and remove the temporary folder.

Viewing 1 replies (of 1 total)
  • The topic ‘Updating private plugin changes plugin folder name’ is closed to new replies.