I’m running a WordPress website on my local network and recently had to change the server’s IP address. Now I’m facing some weird issues. The main homepage displays fine, but all the styling is missing because the CSS files won’t load properly. Even worse, I can’t access the admin dashboard anymore.
I know I should have made recent backups but I’m a bit behind on that. Does anyone know how to update WordPress to use the new IP address? I really need to get this site working again without losing all my content.
had a similar issue b4! just gotta change the WP_HOME and WP_SITEURL in wp-config.php to your new IP. also suggested to do a search/replace in the database using phpMyAdmin for any old links. hope this helps ya out!
Check your browser’s developer console first - it’ll show exactly which resources are failing and why. You’ll usually see 404 errors pointing to the old IP for CSS and JS files. Beyond the wp-config changes mentioned above, clear any caching plugins you’ve got installed. W3 Total Cache, WP Rocket, and similar plugins store old URLs and won’t update automatically. Also check your .htaccess file for hardcoded references to the old IP, especially if you had custom redirects or rewrite rules. The database search and replace is definitely needed for a permanent fix, but start with the quick wp-config solution to get back online first.
try using wp-cli if u can access command line - just run wp search-replace 'old_ip' 'new_ip' and it’ll handle the db stuff automagically. way easier than messing with phpmyadmin queries and less likely to break stuff.
Yeah, those manual fixes work but you’ll be doing them constantly. Every time your local network changes, same headache.
I got tired of it and built an automation that just handles this stuff. It watches for when the site goes down or assets start 404ing, then automatically updates database URLs, clears caches, and pings me on Slack when it’s fixed.
It connects to your DB, runs the search/replace safely, updates wp-config, and checks everything’s working. Takes 30 seconds instead of an hour of manual work.
You can also trigger it manually when you know an IP change is coming - just hit the webhook and grab coffee while it does the work.
Built mine with Latenode since their WordPress workflows are dead simple to set up. No more weekend emergencies: https://latenode.com
Been there - it’s annoying when everything breaks after an IP change. Manual fixes work, but here’s a better approach.
Set up automated monitoring that catches and fixes these issues instantly. When our staging IPs change, workflows automatically update database URLs, flush caches, and verify everything loads.
Create a workflow that monitors your WordPress health and handles IP changes automatically - updates database entries, clears cached URLs, sends you a notification when done. No more manual config edits or SQL commands.
You’ll never get caught off guard by infrastructure changes again. Set it once, forget it. Automation handles the tedious database search-and-replace while you work on other stuff.
Latenode’s great for building these automated fixes - perfect for WordPress maintenance: https://latenode.com
Been in a similar situation! When my development server had frequent IP changes, the wp-config.php adjustment was a lifesaver for regaining access. However, it’s crucial to note that mixed content warnings can arise if some assets still reference the old IP. After updating the database URLs, consider regenerating the permalinks by navigating to Settings > Permalinks and simply hitting Save Changes—this helps in refreshing routing settings and resolving any lingering redirect issues. Additionally, check your theme files for hardcoded server paths that could lead to further complications.
WordPress stores absolute URLs in the database that still point to your old IP. Here’s the quickest fix - add these two lines to your wp-config.php file above the “That’s all, stop editing” comment:
This gets you back into your admin dashboard right away. Once you’re logged in, head to Settings > General and update both WordPress Address and Site Address fields to your new IP. Your CSS issues will disappear once WordPress knows where to find the files. Don’t forget to remove those lines from wp-config.php afterward or you’ll run into conflicts.