Why does my custom Wordpress plugin's directories get merged instead of overwritten?

What issue or error are you experiencing?

I created a custom plugin for my site that handles things like loading custom css files, and modifying output server-side. I use Local by Flywheel for local site development and AllInOneWPMigration for moving sites.

When I export and import a site, use the “find and replace” function in AI1WPM and export to a file. I then upload using the same plugin on the other site. I notice that my custom plugin’s directory structure changes on import. Instead of my plugin directories and files being overwritten with the new directories and files, my directories are being merged. The files with with the same name are properly overwritten with the new file, but all other directories and files are combined.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

  1. Create custom plugin on local site
  2. Export and upload to live site
  3. Change file names, directory structure on live site
  4. Export from live site and import to Local site

System Details

  • Local Version:
  • Operating System (OS) and OS version:
    Mac m1 / Sonoma 14.2.1

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @jaytee

What do your import steps look like? Are you dragging and dropping a zip file into Local?

Have you tried using a plugin other than All in One or doing a manual export/import to see if the structure retains itself?

@Nick-B Since I use all in one, I’m importing while the local site is running. So after exporting from a site (either Live or Local), I use the Ain1 Import function and import the previously exported file.

I tried export using the WP Migrate Lite. There are 2 ways of manually importing to local. Since simply dragging and dropping the .zip file onto the Local app creates a “new” local site (it won’t let me ‘overwrite’ an existing site), my issue wouldn’t apply there, since there would be no existing files to compare too. I did test the 2nd method by importing manually (drag and drop in the filesystem, as opposed to “over the local app”) and files are correctly replaced, as they should be (since this way ensures the filesystem is overwritten).

It sounds like utilizing the manual method may be your best bet for ensuring things are how you would like them. I can ask the team to look into this to see if there is anything we can influence from our end but if it’s something specific to the plugin itself we may not be able to alter what’s happening.

@Nick-B sounds good. I’m leaning towards the issue being with All In One, and I’ve also posted in their support forum, but I didn’t know a way to clearly test if it might be related to Local so I thought I’d post here to see if anyone had any insight into Local’s settings that could/might affect how Wordpress plugin’s import site plugin data.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.