This guide walks you through editing a WordPress child theme by connecting to your hosting server with FileZilla. You’ll learn how to download the child theme’s files, make changes locally, and upload them back safely—so your customizations survive theme updates and don’t break your site.
What You’ll Need
- FileZilla (free, available for Windows, macOS, and Linux)
- FTP/SFTP credentials from your hosting provider (hostname, username, password, and port if applicable)
- A code editor like Notepad++ (Windows), TextEdit (macOS), or VS Code
- WordPress admin access to verify changes and clear caches if needed
Step-by-Step
- Download and install FileZilla from the official website. Install it like any other program.
- Open FileZilla. You’ll see four main panels: local files (left), remote files (right), and transfer queues at the bottom.
- Connect to your server: In the top toolbar, enter your FTP hostname (e.g.,
ftp.yourdomain.comor your server IP), your username, password, and port (usually 21 for FTP, 22 for SFTP). Click “Quickconnect.” If prompted about a certificate, accept it if you trust your host. - Navigate to your WordPress installation: In the remote panel (right side), go to the folder where WordPress is installed. This is often
public_html,htdocs, orwww. If you have a subfolder install, navigate there. - Locate the
wp-contentfolder: Open it, then openthemes. You should see your active theme’s folder and any child theme folders. - Identify your child theme: It’s usually named like
parent-theme-childor something you created. If you don’t have one, you’ll need to create it first (see FAQ). - Download the child theme folder: Right-click the child theme folder in the remote panel and select “Download.” FileZilla will copy it to your local machine (default local directory is shown in the left panel).
- Edit files locally: Open the downloaded folder on your computer. Find the file you want to edit (e.g.,
style.css,functions.php, or template files). Right-click and open with your code editor. - Make your changes: For
style.css, add custom CSS at the bottom, after the existing rules. Forfunctions.php, add PHP snippets before the closing?>tag (if present) or at the end of the file. Be careful with syntax—a single error can break your site. - Save the file in your editor.
- Upload the edited file back: In FileZilla, navigate to the child theme folder in the remote panel. In the local panel, find the edited file. Right-click the file and select “Upload.” If prompted to overwrite, confirm.
- Check your site: Open your WordPress site in a browser. Hard-refresh (Ctrl+F5 or Cmd+Shift+R) to bypass cached files. If you edited PHP, log out and back in to clear WordPress’s opcode cache if you have one.
Common Mistakes
- Editing the parent theme: Always edit the child theme. Parent theme changes are lost on update.
- Uploading to the wrong folder: Ensure you upload into the child theme folder, not the parent or another theme.
- Forgetting to download first: Always download the current version before editing, so you don’t overwrite newer changes made elsewhere.
- Syntax errors in PHP: A missing semicolon or bracket can cause a white screen. Always test locally or have a backup.
- Using the wrong file permissions: If you can’t upload, check that the theme folder is writable (usually 755 for folders, 644 for files).
- Not clearing caches: Browser, CDN, or plugin caches can hide your changes.
Tips
- Use SFTP if possible: It’s more secure than plain FTP. Most hosts support it on port 22.
- Backup before editing: Download a copy of the file you’re about to change to your desktop, just in case.
- Use a child theme for all customizations: Even if you’re just adding CSS, it’s safer than editing the parent.
- Test on a staging site: If your host offers it, test changes there first.
- Keep a local copy: Maintain a local folder with all your theme files for quick edits and version control.
- Learn basic PHP and CSS: Even a little knowledge helps you avoid breaking things.
Troubleshooting
- Can’t connect with FileZilla: Double-check your hostname, username, and password. Try SFTP instead of FTP. Ensure your hosting account is active and your IP isn’t blocked. Contact your host if you still can’t connect.
- Changes don’t appear on the site: Clear your browser cache, any caching plugin (like WP Super Cache or W3 Total Cache), and CDN cache (like Cloudflare). Also, check that you uploaded to the correct theme folder and that the file name matches exactly.
- White screen after editing functions.php: This is a PHP fatal error. Immediately rename the file via FTP (e.g., to
functions.php.bak) to disable it, then fix the syntax locally and upload again. - Permission denied when uploading: Check file and folder permissions. Folders should be 755, files 644. If you can’t change them, use your hosting file manager or contact support.
- FileZilla shows “Connection timed out”: Your firewall or router might be blocking passive FTP. In FileZilla, go to Edit > Settings > Connection > FTP, and change to “Active” mode. Also try using SFTP.
- Child theme not appearing in WordPress: Ensure the child theme folder contains a valid
style.csswith the proper header (Theme Name, Template). The Template must match the parent theme’s folder name exactly.
Frequently Asked Questions
What is a child theme and why do I need one?
A child theme inherits the functionality and styling of a parent theme. You make changes to the child theme, so when the parent theme updates, your customizations are preserved. It’s the recommended way to modify a WordPress theme.
How do I create a child theme if I don’t have one?
You can create one manually: make a folder in wp-content/themes/ (e.g., mytheme-child), create a style.css with the required header (Theme Name, Template), and optionally a functions.php to enqueue the parent’s styles. Then activate it in WordPress Appearance > Themes.
Can I edit a child theme directly on the server without downloading?
Yes, FileZilla allows you to right-click a file and select “View/Edit.” It downloads a temporary copy, opens it in your default editor, and when you save, it automatically uploads it back. However, it’s safer to download the whole folder first for backup.
What files can I edit in a child theme?
You can edit any file, but the most common are style.css for CSS and functions.php for PHP functions. You can also copy template files from the parent theme into the child theme and modify them—WordPress will use the child theme’s version.
Will editing the child theme slow down my website?
No, editing files doesn’t affect performance. However, poorly written PHP or excessive CSS could. Always keep your code clean and efficient.
What if I break my site while editing?
If you have a backup, restore the original file. If not, use FTP to rename the edited file (e.g., functions.php.bak) to disable it temporarily, then fix the code. Always keep a backup before making changes.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Tongue Escape Codes: What They Are0.20 movements/s
- Claude Code Workflow Habits Worth Trying
- HDMI 2.1 Explained: Why It Matters for Gaming
- Veeam Plugin for VMware Cloud Director: How It Works
- Best Path of Titans Server Hosting: Top Picks
- Oppo First Foldable: 120Hz Display & Snapdragon 888