Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Fix a 500 Internal Server Error After Changing the WordPress URL

A URL change can leave WordPress, rewrite rules, or server redirects pointing at the wrong place. This guide shows how to regain access, correct the database, isolate .htaccess and plugin conflicts, and verify the site safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A 500 Internal Server Error immediately after changing a WordPress URL usually means WordPress, a rewrite rule, or a server component is still using the old address or an invalid path. Start by confirming the correct WordPress Address and Site Address, then use the least destructive recovery method available: temporarily override the values in wp-config.php, isolate .htaccess, and test plugins and themes. Once the site loads, correct the database values and regenerate permalinks.

Back up the WordPress files and database before editing configuration or database records. The exact fix depends on whether you can reach the dashboard, files, the database, or the server configuration.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the two WordPress URL settings actually control

WordPress stores two related but distinct addresses. The WordPress Address (URL), often called siteurl, is the location of the WordPress core files. The Site Address (URL), often called home, is the public address visitors type in a browser. WordPress documentation describes the Site Address as “the address you want people to type in their browser to reach your WordPress blog.”

Setting Purpose Typical value
WordPress Address (URL) / siteurl Directory containing wp-admin, wp-includes, and the core files https://example.com/wordpress when WordPress is installed in a subdirectory
Site Address (URL) / home Public address visitors use https://example.com when the installation is exposed at the domain root

Both values should use the protocol actually serving the site, such as https://, and neither should end with a trailing slash. A 500 can follow a swapped domain and installation path, a missing subdirectory, an accidental http/https mismatch, or an address copied with an extra slash. If WordPress is installed in /wordpress, its core address normally includes that path; the public Site Address may omit it when the installation is configured to serve the root domain.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Protect the site before troubleshooting

Make a copy of the entire WordPress directory and a database export before changing wp-config.php, renaming files, or editing options. Keep custom rewrite rules, redirects, and server settings in a separate text file. A backup gives you a way to undo a mistaken URL, an incomplete SQL update, or a deleted rewrite rule.

Identify which access methods you still have. You may be able to use the dashboard, an FTP client or hosting file manager, phpMyAdmin or another database tool, or a server shell. If none is available, the host must perform the recovery. Do not repeatedly change URL fields while the site is unavailable; first establish the intended URL pair and then apply one controlled change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a recovery path based on the symptom and access you have

Symptom or task Access needed What it changes Reversible?
Correct URL while the dashboard works WordPress dashboard Updates the stored home and siteurl values Yes, if the previous values are recorded
Dashboard locked out after the change File access Temporarily overrides the database with WP_HOME and WP_SITEURL Yes; remove the definitions later
Stored values are still wrong Database access Corrects the home and siteurl rows in the options table Only with a backup or a reverse update
Hard 500 after URL editing File access Temporarily removes the active Apache rewrite file Yes; restore the saved file
500 remains with correct URLs File access or dashboard Disables plugins and tests a default theme Yes; restore names or reactivate items
Fatal-error notice with a recovery link Administrator email and browser Enters WordPress Recovery Mode and isolates the failing extension Yes; the extension can be reactivated after testing
Nginx or IIS rewrite failure Server configuration access or host support Inspects the active server block or web.config, not .htaccess Depends on the host’s configuration controls

Step 1: Confirm the intended URL pair

Write down the address visitors should use and the directory where the WordPress files actually reside. Include the protocol and path, but omit the final slash. For a root installation, both values may be https://example.com. For a subdirectory installation, the WordPress Address might be https://example.com/wordpress while the public Site Address is https://example.com.

  • Use https:// only when the site, proxy, or load balancer is configured to serve HTTPS consistently. Do not set one value to HTTPS and the other to HTTP unless that difference is intentional and supported by the installation.
  • Check the spelling of the domain and whether www is part of the canonical address.
  • Check every path segment. A value that points to /blog when the files are in /wordpress can produce a server error or endless redirects.
  • Remove a trailing slash from each stored value.

If you can still reach Settings > General, inspect both fields there. Do not save a guess. If the dashboard is unavailable, continue with the temporary file override in the next step.

Step 2: Temporarily override the URLs in wp-config.php

When the wrong values prevent the dashboard from loading, open the WordPress root directory with an FTP client or hosting file manager. Edit wp-config.php and add these definitions above the line that says That's all, stop editing (the exact comment may vary):

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Replace the first value with the public Site Address and the second with the location of the WordPress core files. If the core files are in a subdirectory, include that directory in WP_SITEURL. Keep the protocol and path exactly as established in Step 1.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These constants override the corresponding values read from the options table, allowing WordPress to boot with working addresses. They do not update the database. While the definitions remain, the URL fields on the General Settings screen cannot be edited normally because the constants take precedence.

Save the file and test both the front end and /wp-admin/. If the 500 disappears, do not treat the temporary override as the completed migration. Correct the stored rows in the database, verify them, and then remove the two definitions if you want the dashboard fields to be editable again. Keep the backup of the original file until the site has passed the final checks.

Step 3: Correct the stored database values

The options table normally contains rows named home and siteurl. The table may not literally be named wp_options because the installation can use a custom prefix. In a database tool, select the table whose name ends in _options, confirm that the option names are exactly home and siteurl, and update them to the values determined in Step 1.

For an installation that actually uses the default prefix, a carefully reviewed SQL update would look like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
UPDATE wp_options
SET option_value = 'https://example.com'
WHERE option_name = 'home';

UPDATE wp_options
SET option_value = 'https://example.com'
WHERE option_name = 'siteurl';

Replace the table name and values with those belonging to the site. If the core files are in a subdirectory, the siteurl value must include that path while home may not. Run the statements only after exporting the database. A malformed query, the wrong table prefix, or an omitted path can make the outage worse.

After updating the rows, clear the temporary constants from wp-config.php if you want to manage URLs in the dashboard. Reload the front end and administration area in a private browser window. If the site now loads, continue with permalinks and extension testing instead of making additional URL changes.

Step 4: Isolate a corrupted Apache .htaccess file

WordPress identifies a corrupted .htaccess file as a common cause of an Internal Server Error. This applies to Apache configurations that use per-directory rewrite rules. Before touching it, download a copy and separately preserve any custom redirects, security rules, or caching directives that are not generated by WordPress.

  1. Open the WordPress directory in the file manager, FTP client, or shell.
  2. Rename .htaccess to .htaccess_old (or another diagnostic name). Renaming is safer than deleting because the original rules remain available.
  3. Request the site and /wp-admin/ again. If the 500 is gone, the rewrite file or one of its custom rules was involved.
  4. After dashboard access returns, go to Settings > Permalinks and click Save Changes without changing the structure. WordPress will generate a fresh rewrite file.
  5. Reapply custom redirects and rules one at a time, testing after each addition. Update rules that still reference the old domain, protocol, or directory.

A .htaccess test is not appropriate for every server. Nginx uses its active server block, and IIS uses web.config. Ask the host to inspect those configurations, including redirects at a reverse proxy or load balancer, rather than creating an Apache file on a server that does not read it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 5: Test plugins and the active theme

If the URL pair and rewrite configuration are correct but the 500 continues, isolate PHP code that may still assume the old address or fail during bootstrap. With dashboard access, deactivate every plugin, test the site, and reactivate extensions individually. Record the result so the offending plugin can be updated, reconfigured, or replaced.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Without dashboard access, rename the wp-content/plugins directory temporarily, for example to plugins.off. WordPress will treat the plugins as unavailable. Test the front end and login, then restore the directory name once the test is complete. If the error returns immediately after restoration, leave the directory available and deactivate extensions through the dashboard or database one at a time.

Test the theme separately. Switch to an installed default WordPress theme from the dashboard. If that is impossible, use the database or hosting support to select a default theme, provided a compatible default theme is present. A theme can contain hard-coded URLs, redirect logic, or PHP that crashes when the address changes. Do not delete the original theme while diagnosing; preserve it for rollback.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Step 6: Use WordPress Recovery Mode when a fatal error is detected

WordPress Recovery Mode was introduced in version 5.2. When WordPress detects a fatal error, it may send an administrator a recovery link. Opening that link starts a protected session in which the administrator can access the dashboard and deactivate the plugin or theme identified as failing, without editing code directly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open the recovery link from the administrator email in the same browser where you will troubleshoot.
  2. Read the component named in the error notice and deactivate only that plugin or theme first.
  3. Test the site in a normal browser session after leaving Recovery Mode.
  4. Update, reconfigure, or replace the failing component before reactivating it.

Recovery Mode helps with fatal PHP errors; it does not repair incorrect URL rows, invalid server rewrites, or a host-level failure. Continue with those checks when the recovery session does not identify a usable component.

Step 7: Distinguish a hard 500 from login and redirect failures

A browser may report a redirect loop, repeated login screen, or a blank response even when the underlying problem is the same URL mismatch. Check that WP_HOME, WP_SITEURL, and the database’s home and siteurl values agree with the intended protocol and paths. Mixed HTTP/HTTPS values can cause WordPress, a proxy, a content-delivery network, and the web server to redirect in conflicting directions.

  • Clear cookies for the affected domain and retry in a private window. A stale login cookie can preserve the old domain or protocol.
  • Temporarily rename the plugins directory to rule out a redirect or authentication plugin.
  • Ask the host whether an HTTPS redirect, proxy setting, CDN rule, Apache rule, or Nginx server block is rewriting the request before it reaches WordPress.
  • Verify that the canonical host name is consistent, including whether the site uses www.

Do not keep adding redirect rules to compensate for a wrong database value. First make the WordPress settings and the server’s canonical protocol agree; then add only the single redirect policy the site needs.

Step 8: Regenerate permalinks and check the complete site

Once the site and dashboard load, regenerate rewrite rules through Settings > Permalinks > Save Changes. This updates the generated Apache rules after the URL correction. Visit the home page, a post, a page, an attachment if the site uses them, the login screen, and an administrative screen. Check that internal links use the intended domain and protocol and that no request points to the old subdirectory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Clear any page, object, proxy, or CDN cache only after the configuration is correct. Cached redirects can make a fixed site appear broken. Test from a separate browser or network so you are not relying on a stale cached response. Review the server’s error log around a fresh failed request if the 500 remains; the PHP file or rewrite directive named there determines whether to return to plugin/theme isolation or involve the host.

When to contact the hosting provider

Escalate when you cannot access the files, database, or active server configuration, or when the error log shows a permission, PHP-FPM, memory, module, or host-level failure outside WordPress. Tell support the exact time of a failed request, the URL and protocol you intended to use, whether .htaccess was renamed, whether plugins were disabled, and whether the temporary constants changed the response. Provide the backup and the original custom rewrite rules, but do not send passwords in an email.

On managed WordPress hosting, migration support can often restore a pre-change backup or correct server redirects. Ask what will be changed, whether the database will be backed up first, and how the provider will preserve custom rules. If the host cannot provide file, database, or server access, changing more WordPress settings from the browser is unlikely to resolve a 500.

Final recovery checklist

  • The public Site Address and WordPress Address point to the intended domain, protocol, and paths, with no trailing slash.
  • The WordPress Address identifies the directory containing the core files; it is not automatically identical to the public address when a subdirectory is used.
  • Temporary WP_HOME and WP_SITEURL definitions were used only to regain access, and the database rows were corrected afterward.
  • The original .htaccess and all custom redirects were backed up before permalinks were regenerated.
  • Plugins and the theme were tested in isolation, and any failing component remains disabled until it is repaired or replaced.
  • Recovery Mode was used when WordPress reported a fatal error.
  • Cookies, caches, proxy rules, CDN redirects, and server-level HTTPS behavior were checked for login loops or repeated redirects.
  • The front end, login, dashboard, permalinks, and representative content URLs work from a fresh browser session.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.