WordPress File Edits Over FTP Not Taking Effect? Fix
If you edit WordPress files over FTP and the changes don’t show up on your site, the most likely cause is a caching layer—either your web host’s server cache, a WordPress caching plugin, or your browser cache. The fix is to clear all three caches and, if that doesn’t work, check that you’re editing the correct file on the correct server.
Why Your FTP Edits Might Not Appear
When you upload a modified file via FTP, the file is replaced on the server. However, your site may still display the old version because of caching. Here are the main reasons:
- Server-side caching: Many hosts (like SiteGround, Kinsta, or WP Engine) run a server-level cache (Varnish, NGINX FastCGI Cache, or Redis) that serves a static copy of your pages. This cache doesn’t know that your file changed, so it keeps sending the old version.
- WordPress caching plugin: Plugins like W3 Total Cache, WP Super Cache, or WP Rocket create static HTML files of your pages. If you don’t purge the cache after editing a theme file, visitors (and you) will see the old page.
- Browser cache: Your browser may have stored a copy of the page or the CSS/JS file. Even if the server has the new file, your browser might use its local copy for a while.
- CDN cache: If you use a CDN like Cloudflare, it may cache your site’s assets. You need to purge the CDN cache as well.
- Wrong file or wrong directory: You might be editing a file in a staging site, or you might have multiple WordPress installations and you’re uploading to the wrong one.
Step-by-Step Fix: Clear All Caches
Follow these steps in order. After each step, check if your change appears.
- Clear your browser cache (or use a private/incognito window). For most browsers, press Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac) to do a hard refresh.
- Purge your WordPress caching plugin. Go to the plugin’s settings page (e.g., “Performance� for W3 Total Cache, “Settings� for WP Super Cache) and click the button to purge/delete all caches.
- Clear server-side cache. If your host provides a control panel (cPanel, custom dashboard), look for a “Purge Cache� or “Clear Cache� button. If you don’t see one, contact your host’s support and ask them to flush the server cache.
- Purge CDN cache. If you use Cloudflare or another CDN, log in to your CDN dashboard and purge the cache (for Cloudflare: Caching → Purge Everything).
- If the change still doesn’t show, verify the file path. In your FTP client, make sure you’re in the correct directory. For a standard WordPress install, the theme files are in
/wp-content/themes/your-theme-name/and plugin files in/wp-content/plugins/your-plugin-name/. If you have a staging site, the path might be different.
Common Pitfalls When Editing via FTP
Beyond caching, there are other reasons your edits might not take effect:
- Editing the wrong file: For example, you might be editing
header.phpwhen the change you want is infooter.php. Double-check the template hierarchy. - File permissions: If the file is not writable, your FTP client might upload a new file but fail to overwrite the old one. Check that the file permissions are set to 644 (or 664) and directories to 755. If you get a permission error, change the permissions via your FTP client or host’s file manager.
- Syntax errors: A single typo in a PHP file can cause a “white screen of death� or prevent the file from loading. If that happens, re-upload the original file or fix the error via FTP (you may need to rename the file to disable it).
- Using a cached version of the file: Some FTP clients have a “cache� of the remote file list. Make sure you’re not accidentally uploading to a local copy that you think is the remote one.
How to Test Whether It’s a Cache Issue
To confirm that caching is the culprit, you can bypass the cache temporarily:
- Add a query string to the URL:
https://yoursite.com/?nocache=123(or?x=1). This often bypasses browser and CDN caches, but not always server-side cache. - Use an online tool like “View Page Source� or a caching checker to see if the HTML contains your change.
- Check the raw file directly in your browser: If you edited a CSS file, go to
https://yoursite.com/wp-content/themes/your-theme/style.cssand see if the change is there. If it is, then the file is updated and the issue is definitely caching.
Why You Should Consider Using SFTP or SSH Instead of FTP
FTP (File Transfer Protocol) is unencrypted, meaning your username and password are sent in plain text. A more secure option is SFTP (SSH File Transfer Protocol) or FTPS (FTP over SSL). Most hosts support SFTP on port 22. Using SFTP not only protects your credentials but also often works better with firewalls. If your host offers SSH access, you can also use command-line tools like vim or nano to edit files directly on the server, which avoids the upload step entirely.
Alternative: Use the WordPress Admin Editor
If you’re not comfortable with FTP, WordPress has a built-in file editor under Appearance → Theme File Editor (for themes) and Plugins → Plugin File Editor (for plugins). This editor makes changes directly on the server, so there’s no upload issue. However, it has limitations:
- It may be disabled on some hosts for security reasons.
- If you make a syntax error, you can lock yourself out of the site.
- It doesn’t give you a local backup of the file.
For small changes, the admin editor is convenient. For larger changes, always edit locally and upload via SFTP, keeping a backup of the original file.
Frequently Asked Questions
Why do my CSS changes not show up even after clearing cache?
If you’re editing a CSS file, the browser might be caching it aggressively. Try a hard refresh (Ctrl+Shift+R) or open the CSS file directly in your browser and do a hard refresh there. Also, some caching plugins “minify� CSS files, which means they combine and compress them into a single file. You need to disable minification or purge the cache after editing.
I edited a PHP file and now my site is blank. How do I fix it?
This is usually a syntax error. You can fix it by re-uploading the original file via FTP (if you have a backup) or by using your host’s file manager to edit the file and remove the error. If you can’t access the site at all, you can rename the plugin/theme folder via FTP to deactivate it temporarily, then fix the file.
Does clearing the cache in WordPress delete my settings?
No, clearing the cache only removes temporary files (like cached pages and minified scripts). It does not affect your posts, pages, or plugin settings. It’s safe to do.
Can I edit WordPress files directly on the server using the host’s file manager?
Yes, most hosts provide a file manager in their control panel (like cPanel’s File Manager). It works similarly to FTP but runs in your browser. This can be a good alternative if FTP is not working.
Why does my change show up in the admin but not on the front end?
This is almost always a caching issue. The admin area is often not cached, so you see the change immediately. The front end is cached, so it serves the old version. Clear all caches as described above.
Is it safe to edit theme files directly?
It’s generally safe if you have a backup and know what you’re doing. However, when you update the theme, your changes will be lost. A better practice is to create a child theme and make your changes there. That way, updates won’t overwrite your edits.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.