The Misc Shortcodes and Features addon has a feature to allow automatic downgrade of your expired or inactive member’s account to a free level. This lets your premium members (whose accounts have expired) to still be able to log into your site and browse content for a Free membership level.
Installing the Misc Shortcodes and Features addon
If you want to use this feature, then download the addon from this page and install it.
Enabling the Auto Downgrade Feature
After you active the addon, go to the settings menu labelled “Misc Shortcodes & Features”

Now you can enable the checkbox labelled “Enable Auto Downgrade Expired Account” and set the desired membership level (that the account should be downgraded to).

Now, when a member with an account status of “expired” or “inactive” tries to log into the site, they account will be downgraded to the level you have specified.
Note: The account downgrade action takes place dynamically at the time the member (with expired account) tries to log into the site.