How to Remove WP_SITEURL
Creating a full backup of your site’s files and database before proceeding is recommended.
1. Install & Activate WP File Manager
- In your WordPress admin sidebar, go to Plugins ➔ Add New
- Search for WP File Manager
- Click Install Now, then Activate
2. Open the File Manager
In the admin sidebar, click WP File Manager to launch the file browser.
3. Locate wp-config.php
- In the left‑hand tree, expand your site’s root folder (e.g.
/public_htmlor/) - Find the
wp-config.phpfile, right-click on it and choose Code Editor.
4. Find the WP_SITEURL Definition
Press Ctrl + F (Windows) or ⌘ + F (Mac) and search for
phpdefine( 'WP_SITEURL', 'https://example.com' );
5. Remove or Comment Out the Line
- To remove
- Highlight and delete the entire
definestatement
- Highlight and delete the entire
- To comment out
Wrap it in PHP comments
php//define( 'WP_SITEURL', 'https://example.com' );
6. Save Your Changes
- Click the Save & Close button on the bottom right side of the pop-up editor.
If WP_SITEURL Reappears After Saving
If the WP Landing Kit conflict warning returns after you remove the constant, an external process is rewriting wp-config.php. No WordPress plugin or code snippet can prevent this: WP_SITEURL is a PHP constant that WordPress loads from wp-config.php before any plugin runs, so once it is defined, plugins cannot block or remove it.
How to identify what is rewriting wp-config.php
Start with the most common sources:
- Hosting control panel tools — Platforms such as cPanel (WordPress Toolkit), Plesk (WordPress Manager), and similar managed hosting panels can regenerate or update
wp-config.phpautomatically when syncing or applying settings. - Staging or deployment tools — If you push changes from a staging environment to your live site, the deployment process may overwrite
wp-config.phpfrom a stored copy that still contains the constant. - Backup or migration plugins — Some plugins recreate
wp-config.phpwhen a scheduled backup runs. - Hosting-level scheduled tasks — A server-side cron job or automation script may be updating the file on a schedule.
To identify the source, check the last modified timestamp on wp-config.php in WP File Manager (right-click the file and choose File Info) or in your hosting control panel's file manager. After noting the timestamp, perform one action at a time — save a plugin setting, trigger a backup, or wait for a scheduled task interval — and re-check the timestamp each time to see which action changes the file.
If you cannot identify the source yourself, contact your hosting provider and ask which process is modifying wp-config.php.
Temporary workaround: set wp-config.php to read-only
As a stop-gap while you investigate, you can restrict write access to wp-config.php so external processes cannot overwrite it.
❗ Important: Making wp-config.php read-only prevents WordPress, plugins, and your hosting tools from writing legitimate updates to the file — including core and plugin updates. Only apply this temporarily. Restore write permissions before running WordPress updates or when your host requires access to the file.
In your hosting control panel's File Manager, right-click wp-config.php, choose Permissions or Change Permissions, and enter 0444. If you have terminal access:
chmod 0444 wp-config.phpTo restore normal write permissions when you are done investigating:
chmod 0644 wp-config.php