• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Plugin Settings » Fields » Upgrade the Uploaded Files Using WP-CLI

Upgrade the WP-Members Uploaded Files Using WP-CLI

WP-Members is changing the defaults for where and how it stores files uploaded through the registration form. If you do not have an image or file field in your registration form, then there is no need to worry about this. However, if you have an existing installation prior to 3.5.5, and you have an image or file upload field in your form, you may want to consider this upgrade process which will move existing files to the new structure.

Previously, custom obfuscation was the way to handle this. And that process is still possible. However, now the plugin implements its own obfuscation automatically.

Note: this is not a requirement. However, upgrading is recommended. Any new files uploaded will use the new file structure. Existing files would still be accessible without moving. The necessity of moving will depend on what type of files you have uploaded. Anything of a personal and restricted nature should be moved.

While there is an admin panel for running this process, for installs that may have many users and files to move may find that WP CLI is more stable and effective. Using WP CLI is the recommended method.

It is important to create a backup of your database and filesystem before running these commands. The process is two steps – first moving the files, and second, deleting the old ones. The first step will make changes in the database relative to the file paths so that WP can find them. The second step deletes the old locations. Thus, it is important to create a backup before doing either step in the event that something goes wrong and you need to roll back. While I have taken careful steps to handle the processing, WP is highly customizable as are the possible webservers it runs on. It is impossible to test for every contingency, so doing this without a backup (and knowing how to restore) is at your own risk.

Before running the move, you can query a list of files using the command wp mem fs-upgrade list. It will paginate the results, 20 per page. To display additional pages, use --page=. To display more (or less) per page, use --per_page=.

The first step in moving files is to run wp mem fs-upgrade move. This will create a new path for each file based on the plugin’s new configuration. It will update each file’s information in the database. It will not delete the old files. If there were errors during the move, it will display them at the end. It will give a prompt for the second step.

Once you have run the move command, you can re-run wp mem fs-upgrade list to confirm there are no files remaining to move. If there are no files to move, it will give a success message.

The final step is to delete the old directories and files. You can do this with the wp mem fs-upgrade delete command. If full deletion was successful, it will return a success message. If there were any errors, it will indicate there were errors. Errors may be related to directory permissions. If you are unable to delete using the WP CLI command, you can also do it using your shell account and the rm -rf command.

  • Getting Started
  • Recommended WordPress® Settings
  • Plugin Settings
    • Options
    • Fields
    • Dialogs
    • Emails
    • New Feature Settings
  • Managing Content
    • Restricting Posts
    • Restricting Pages
    • Show Excerpts
    • Custom Post Types
  • Managing Users
    • Import Users
    • Export Users
    • Edit Users
    • Search Users
  • Login
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Removing Registration Options
  • User Profile
  • Memberships
    • Membership Properties
    • Membership Levels
  • Menus
    • Individual Menu Items
    • Logged In Menus
    • Login/Logout Menu Link
  • Customizing Emails
    • Email Address
    • Email Content
    • Email Format
    • Email Shortcodes
    • Email Troubleshooting
  • Customizing Forms
    • Create a Custom Stylesheet
    • Using the WordPress Customizer
    • Login Form HTML
    • Registration Form HTML
    • Widget Login Form HTML
  • Translation and Localization
    • Maintain a custom translation file
    • Filter untranslated strings
    • Multi-language Considerations
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Memberships
    • Email
    • Other Shortcodes
  • WP-CLI Commands
  • API Functions
  • Filter Hooks
  • Action Hooks
  • FAQs
    • Email troubleshooting
    • Passwords are not being included in Emails
    • The plugin isn’t blocking my content
    • Are files protected?
    • How can I prevent registration spam?
    • How to add a shortcode
    • How to apply login redirects
    • Why can’t users log in?
    • Why does reCAPTCHA v3 fail?
    • Troubleshooting Really Simple Captcha
    • Why do I get a 403 error?
    • How do I use code snippets?
    • My changes aren’t showing up
    • How to hide the “Admin Bar”
    • How to add a forgot password link
    • Password reset doesn’t show any fields
    • Domain not included in the password reset link
    • There was an error processing the form
    • Hidden vs. Restricted
  • Demo Videos
  • How to Request Support
  • Copy Settings for Support
  • Hosting Recommendations

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy