How do you enable maintenance mode in WordPress?

For planned work, use a maintenance feature from the hosting platform or a maintained WordPress plugin. Configure a simple public page that explains the interruption and provides another contact method when appropriate. Keep a tested route for administrators and developers to sign in.
A site under genuine maintenance should return an HTTP 503 status so search engines understand that the outage is temporary. The response can include a reasonable Retry-After header. A normal 200 response containing a maintenance message may be indexed as if it were the real page, while a permanent redirect can create additional cleanup.
Exclude payment callbacks, webhooks, monitoring endpoints, or other automated services that must continue during the work. An online store should stop new orders in a controlled way and account for customers already in checkout. Test the maintenance page from a logged-out browser before starting the risky operation.
WordPress creates a temporary .maintenance file during normal core, theme, and plugin updates. If an interrupted update leaves the site stuck, confirm that no update process is running, back up the site, and remove the stale file from the WordPress root. Finish the failed update and check the logs before reopening the site.