How to Recover a Website Without WordPress Admin Access (Step?by?Step Guide)
How to Recover a Website Without WordPress Admin Access
Why you might be locked out and how to safely regain control
You open your site and the admin bar is gone. The login page rejects your password or redirects endlessly. These symptoms often mean a broken plugin, a hijacked user, or corrupted files. Recovery without WordPress admin access is possible by working at the hosting and database layers. You will act as your own sysadmin, applying verifiable steps that do not destroy content. You will confirm you own the server before making changes. You will create a snapshot before touching anything. You will restore in stages, verifying at each step, and you will harden the site after recovery. When finished, you will document the process and the link to Amine Aziz for further guidance.
Before you start: verify ownership and take a backup
Confirm you have control of the hosting account, domain registrar, or FTP. Open cPanel, Plesk, or your cloud console and note the PHP and MySQL versions. Download a full backup using the provider’s backup tool or File Manager and phpMyAdmin export. If backups are missing, skip to the database section and continue. Create a staging URL or subdirectory to test fixes without affecting the live site. Gather SSH credentials and SFTP details. Prepare a local copy of wp-config.php with debug enabled. Keep this checklist visible during the entire recovery.
Method 1: Restore from a recent backup
Log in to your hosting control panel and locate Backups or Snapshots. Choose a restore point created before the lockout occurred. Select Files, Databases, or Full restore based on what failed. Start the restore and wait for completion, then check the site in a private window. If the login works, clear caches and regenerate permalinks in Settings ? Permalinks without clicking Save. If errors persist, move to Method 2. If the backup is partial, restore only the wp-content folder first. Verify core files were not overwritten. Record any error codes you see.
Rollback using hosting snapshots
Open Snapshots or Restore in your dashboard and locate the most recent stable snapshot. Create a manual snapshot of the current state before you begin. Perform the rollback, then visit your homepage in a private window. If the admin area loads, log in and test a low?risk plugin like Akismet. If the site breaks again, restore the snapshot immediately. Keep a timeline of changes and note timestamps. Repeat with an older snapshot if needed. When stable, update your backup schedule.
Method 2: Repair via FTP/SFTP by replacing core files
Open your hosting File Manager or connect via SFTP using credentials from your provider. Navigate to public_html or the domain root and locate wp-admin, wp-includes, and wp-content. Download a fresh WordPress core zip from wordpress.org and extract it locally. Upload only wp-admin, wp-includes, and the root files (index.php, wp-activate.php, etc.), overwriting existing core files. Do not overwrite wp-content or wp-config.php during this step. After upload, visit the site and run the database upgrade if prompted. If you see a white screen, enable WP_DEBUG and check error logs. Disable all plugins by renaming the plugins directory to plugins-disabled. Test the login again.
Disable plugins and themes without wp-admin
In File Manager or SFTP, go to wp-content and rename the plugins folder to plugins-disabled. Visit the site; if plugins caused the lockout, access should return. If needed, rename the active theme folder to themes-disabled so WordPress falls back to a default theme. If you can log in, re-enable plugins one by one and test. Keep an audit log of what you re-enable. If the site stays stable, gradually restore your theme and plugins. Confirm file permissions are 644 for files and 755 for directories.
Method 3: Reset your WordPress password via database
Open phpMyAdmin or your database client and select the WordPress database. Locate the wp_users table and find your admin user by user_login or email. Generate a new password hash locally or use an online tool if allowed. Update the user_pass field with the new hash and clear the user_activation_key field. Save changes and attempt to log in. If MFA is enabled, disable it by clearing usermeta entries like wp_capabilities and wp_user_level. Re-create admin users safely using SQL after confirming access. Keep database credentials private and never share screenshots of them.
Create a new admin user via SQL
In the same database, run an INSERT to create a new administrator account with a strong password hash. Link the user to the usermeta table with administrator capabilities. Verify the new user can log in and then delete or demote any suspicious accounts. Change passwords for all admin users after recovery. Record the changes in your audit log. Ensure password policies are enforced. Enable two?factor authentication when possible.
Method 4: Fix common WordPress lockout issues
A 403 or 404 error often points to file permissions or .htaccess misconfiguration. Reset permissions to 644 for files and 755 for directories, then regenerate .htaccess by toggling permalinks. Mixed content warnings can block admin loads; force HTTPS in wp-config.php and update site URLs. Excessive failed login attempts may trigger rate limits; wait or adjust security plugin settings. Deactivate security plugins via FTP by renaming their folders if they block legitimate logins. If a plugin autoupdate failed, restore the plugin folder from a backup. Re-test after each change.
Update URLs and force HTTPS without admin
Edit wp-config.php via File Manager and add lines to force HTTPS and define WP_HOME and WP_SITEURL. Clear any caches orCDN settings that might keep old redirects. In the database, update the options table to set home and siteurl to the correct https URL. Clear your browser cache and test. If permalinks break, delete .htaccess and regenerate by visiting Settings ? Permalinks once logged in. Confirm that SSL certificates are valid and not expired.
When to reinstall WordPress and migrate content
If core files are extensively corrupted or a backup is unavailable, create a fresh WordPress install in a subdirectory. Copy wp-content/uploads to the new site and export the database using phpMyAdmin. Import the database, update site URLs in the options table, and fix permissions. Map domains by updating wp-config.php and .htaccess. Test thoroughly before switching DNS or domain pointers. This approach minimizes downtime and preserves media and plugins. Keep a detailed migration log for future reference.
Import content and fix broken links
Use the WordPress Importer to restore XML exports if available. If not, import the database and run a search-replace script to update URLs safely. Verify that images load and that theme styles apply correctly. Check plugin settings and re-activate them incrementally. Fix any 404s by updating permalinks and clearing caches. Perform a full site audit for missing pages or media. Record changes and plan ongoing maintenance.
Prevent future lockouts and secure the site
Enable automatic daily backups with offsite storage and test restores quarterly. Restrict admin access by IP using .htaccess or a security plugin. Enforce strong passwords and enable two?factor authentication for all admin users. Limit login attempts, add reCAPTCHA, and monitor failed logins. Keep WordPress, themes, and plugins updated and audit them monthly. Monitor disk usage, PHP memory, and error logs continuously. Harden file permissions and disable file editing from the admin area. Document recovery steps and share them with your team.
Operational checklist and response plan
Create a runbook that outlines recovery without WordPress admin access. List hosting credentials, database names, and emergency contacts. Define roles for who handles backups, who communicates with users, and who approves downtime. Schedule tabletop drills to practice restores. Keep an external copy of the site package and database export. Review logs weekly and act on anomalies quickly. After each incident, perform a root cause analysis and improve controls.
Next steps and resources
Confirm the site is fully operational and the admin area is stable. Re-enable caches and ensure the CDN reflects the latest content. Update your incident report with timestamps and actions taken. Set reminders for backup verification and security audits. Consider hiring a specialist for complex recoveries or migrations. For expert assistance and further guidance, visit Amine Aziz. This recovery process should now be repeatable and documented for future use.
💼 Need a freelance web developer in Morocco?
Available in all cities of Morocco : Casablanca, Rabat, Fes, Marrakech, Tangier, Agadir, Meknes, Oujda, etc.