Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Put WordPress in a Read Only Mode for Migrations and Maintenance

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want your WordPress site to be in a read only mode?

By freezing your site’s content, you can make sure that no one changes anything on your website, even if they normally have edit access. This can help you avoid errors, conflicts, and confusion when you’re making changes to your website.

In this article, we will show you how you can put your WordPress site in a read only mode for site migrations and maintenance.

how to put your wordpress website in read-only mode

Why Put Your WordPress Site in a Read Only State for Site Migrations and Maintenance

You can tweak a lot of settings on your WordPress website without stopping visitors from accessing the site. However, when you’re making a big change to your website, it’s a good idea to put your site into a read only state. 

For example, if you’re moving WordPress to a new host or server, upgrading to a new version of WordPress, or installing a new theme, then it can affect the user experience and stop your site from working normally.

Setting up read only mode can help you avoid losing any data or content that’s added to your site while you’re making the change. You also prevent frustration from a poor user experience when features don’t work right.

For example, if someone is writing a new post in the WordPress dashboard while you’re migrating to a new server, then all of their hard work may be lost. Or perhaps a user can’t add products to their cart or checkout, so they leave your site.

That said, let’s take a look at the best way to put your WordPress site in read-only mode to prevent those issues.

How to Put Your WordPress Site in a Read Only State for Site Migrations and Maintenance

There are a few dedicated content freeze or read-only mode plugins available, but they are all currently outdated and not actively maintained by their developers.

That’s why we recommend using the Lock User Account plugin instead.

This is perfect for membership sites, online stores, or any other type of site that allows user registration.

This plugin lets you temporarily lock any user out of their WordPress account. Anyone who is locked out of their account won’t be able to edit the site’s content or add any new content, although visitors will still be able to see the website.

If a user tries to log into a locked account, then they’ll see a message simply stating ‘Your account has been locked.’ You can customize this message to give your users more information.

A locked WordPress user account

Now, using this plugin doesn’t actually freeze your site or prevent database changes. That’s why we also recommend temporarily disabling your comments and any contact forms on your site as well. We’ll show you how to do that below.

First, you’ll need to install and activate the Lock User Account plugin. If you need help, then please see our guide on how to install a WordPress plugin.

Before starting the content freeze, you can change the message that users will see if they try to log into a locked account. For example, you might want to explain that you’re changing your domain name or doing essential maintenance.

To change the default ‘Your account has been locked’ error message, simply head over to Settings » General.

The WordPress general settings page

Towards the bottom of the screen, you’ll see a new ‘Lock User Account’ section.

You can now simply type a new message into the ‘Locked User Message’ field. Once you’re happy with the message, just click on the ‘Save Changes’ button.

Creating a custom WordPress login message

After that, you’re ready to put your site into read-only mode.

To go ahead and start locking users out of their account, head over to Users » All Users.

A list of WordPress user accounts

On this screen, you’ll see all the people who have an account on the site.

The ‘Locked’ column shows whether each user currently has access to their account (unlocked) or not (locked).

A locked WordPress user account

To go ahead and temporarily lock a user out of their account, just click to check the box next to their profile picture.

If you want to lock multiple people out of their accounts, then click to select multiple boxes.

Note: It’s very important to make sure you leave your own user account unlocked. If you accidentally get locked out, see our guide on how to deactivate all plugins without wp-admin access so you can deactivate the Lock User Account plugin from your WordPress hosting panel.

Adding a content freeze to multiple WordPress user accounts

After selecting one or more usernames, click on the ‘Bulk actions’ dropdown and then select ‘Lock.’

When you’re ready to go ahead and lock these people out of their accounts, click on the ‘Apply’ button.

Putting a WordPress site into a read only state

Now, the site is essentially in read only mode for your users, and if anyone with a locked account who tries to log in will get an error message.

Once you’ve finished your work, you can unlock the user accounts. Simply go back to Users » All Users and repeat the process above. Only this time, be sure to select ‘Unlock’ from the ‘Bulk Actions’ dropdown.

After that, you can click the ‘Apply’ button to reactivate these accounts.

Unfreezing WordPress user accounts

How to Temporarily Disable Comments and Form Entries

Before you start your site migration or other big changes, you’ll also want to temporarily disable comments and form entries on your site. If someone submits a comment or form in the middle of your changes, that data would be lost.

To temporarily disable comments quickly and easily on your whole site, we recommend using WPCode.

Simply install and activate the free WPCode snippets plugin and then navigate to Code Snippets » Add Snippet.

From here, you can click on the Comments category in the left menu and then click on ‘Use snippet’ under ‘Completely Disable Comments’.

WPCode snippet to completely disable comments on your WordPress site

On the next screen, all you need to do is set the toggle from Inactive to Active.

Then, click the Update button and your snippet will be live.

WPCode activate snippet

If you’d prefer to disable comments manually without a plugin, you can see our step by step guide on how to completely disable comments in WordPress.

We also recommend temporarily disabling any contact forms or other forms on your website. You can simply remove the form and replace it with your business email address temporarily so that you don’t miss out on any important messages.

At this point, you are ready to migrate your site or do essential maintenance work without worrying about conflicts and errors.

BONUS: How to Create Beautiful Maintenance Pages in WordPress

In addition to locking user accounts and securing forms and comments, you can also put your site into maintenance mode, so no one can access the primary content.

A well-designed maintenance page can explain exactly why your site is is in a read only state, and when visitors can expect it to come back online.

This is where SeedProd comes in. It is the best drag-and-drop page builder for WordPress, and it allows you to create a completely custom maintenance page.

You can use the free version of SeedProd to create a beautiful maintenance mode page.

The SeedProd Pro homepage

For more details, you can see our guide on how to put your WordPress site in maintenance mode.

We hope this article helped you learn how to put your WordPress site in read only mode for site migrations and maintenance. You can also go through our guide on the best live chat software for small businesses and how to allow user registration on your WordPress site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

6 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    I use the ‘Under Construction’ plugin for this purpose. Does this method have any benefits other than making the website visible? And couldn’t it be counterproductive compared to the method of hiding everything behind a paragraph information in case something goes wrong?

    • WPBeginner Support says

      This would be for sites with multiple authors to prevent someone from creating a draft or making a modification while a site is being migrated, you can use a coming soon page with this if you wanted for your site visitors.

      Admin

  3. Mark Conger says

    Note that Code Freeze has been abandoned, it seems. But it has been forked and can found on github.

  4. Anonymous says

    So how about the FILE WRITE permissions? Let’s say the WP site is under attack, then how do i lock the any WRITES to the file systems?

  5. Kevin says

    Thanks for writing on this plugin. I wondered if such a thing would be generally useful and I’m glad to see that, even if its use remains rather niche, it is useful to some people.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.