Does WordPress merges a plugin folder during update?

Tested unconventionally:

  • Created a folder in Desktop named abc – timestamp 12:00:00
  • Created another folder named abc somewhere else after a second – timestamp 12:00:01
  • Copied second one and paste on desktop > Want to replace? > Yes
  • Folder abc (first one) replaced with folder abc (second one)

Result: Timestamp stayed same as previous 12:00:00

  • Downloaded Theme Check’s older version
  • Unziped in plugins/ directory, and checked the timestamp 12:00:00
  • Visited wp-admin/update-core.php so the new version warning appears
  • Select ‘Theme Check’ to update, and hit Update Plugins button
  • Plugin successfully updated. Checked the folder properties of ‘Theme Check’

Result: Timestamp is new 12:01:37

I tried some other methods, opening the plugins/ directory in another window and observing what’s happening behind. Seen no replacement.

So, it’s confirmed from me that,

  1. WordPress create .maintenance file in root first,
  2. then download the .zip file first in temporary location or memory,
  3. then delete the older version’s folder,
  4. then unzip the new version there, and
  5. finally delete the .maintenance file from the root

No replacement – Confirmed. 🙂