Free tools Windows power users keep installed
One-click scans. No signup required.
You can edit a WordPress child theme safely with FileZilla by downloading the target file, changing the local copy in a code editor, and uploading it back to the same remote path only after keeping a known-good backup. The child theme directory is the right place for CSS, template overrides, and custom PHP because those files remain separate when the parent theme is updated.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What editing a child theme over FTP actually changes
A child theme is an extension of a parent theme. WordPress loads the child theme alongside the parent, so your custom files can change presentation or add functionality without editing the parent directory. When the parent receives an update, files stored in the child directory are not replaced by that update.
As an Amazon Associate I earn from qualifying purchases.
FileZilla gives you a local pane and a remote pane. The remote pane shows the files on your hosting account; the local pane shows a working folder on your computer. The safest pattern is to download a remote file first, edit that downloaded copy, and upload it only after you have saved the original or another known-good version.
FTP and SFTP are connection methods, not WordPress features. Your host must provide the server address, username, password or key, port, and the correct protocol. Do not substitute your WordPress administrator password unless your host explicitly says that it is also an FTP credential.
#1 Best Overall
Prepare before opening FileZilla
Collect the connection details
Get these values from the hosting account or its support team:
- Host name or server address.
- Protocol: FTP, explicit FTP over TLS, or SFTP, exactly as supplied.
- Port, if the host requires one.
- FTP or SFTP username.
- Password, private-key setting, or other authentication method.
- The account directory that contains the WordPress installation.
If the host offers SFTP, choose the SFTP entry and credentials provided for that service. Do not guess a port or change the protocol when a connection fails; verify the values with the host first.
Create a local working area
Make a folder for this site, then create a dated subfolder for each change set. Download the file you will edit into that folder and keep the untouched download beside the working copy. A useful naming pattern is functions-before-header-change.php or a folder such as 2026-10-15-child-theme-backup. The name is for your own tracking; the remote file must retain its original name.
Choose a plain-text editor
Use an editor designed for code rather than a word processor. PHP, CSS, and template files must remain plain text. Turn on visible line numbers and syntax highlighting if your editor supports them, and save using the file’s existing extension and encoding. Do not let the editor append an extra extension such as .txt.
Connect to the site in FileZilla
- Open FileZilla and choose the Site Manager.
- Create a new site entry and enter the host, protocol, port, username, and authentication details supplied by the host.
- Connect and read the status messages in the top panel. A successful login should produce a remote directory listing rather than an authentication or timeout error.
- In the local pane, browse to the working folder you created. In the remote pane, browse to the directory that contains the WordPress installation.
The exact starting directory varies by host. Look for the familiar WordPress folders rather than assuming that the account root is the site root. The correct installation contains folders such as wp-admin, wp-includes, and wp-content.
Rank #2
- Used Book in Good Condition
Find the child-theme directory
- Open
wp-contentin the remote pane. - Open
themes. - Identify the folder belonging to the child theme. Its folder name is the child theme directory name, while the parent has its own separate directory.
- Open the child folder and check that
style.cssis directly inside it, not buried in another subfolder.
The child theme’s style.css must be in the root of the child directory. Its Template header must exactly match the parent theme folder slug, including spelling, hyphens, and capitalization where the server treats names as case-sensitive. WordPress uses that relationship to identify the parent.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
/*
Theme Name: Example Child
Template: example-parent
*/
In this example, the parent directory must be named example-parent. A display name shown in the WordPress dashboard is not a substitute for the directory slug in the Template line. If the value is wrong, WordPress can treat the child as invalid or fail to associate it with the intended parent.
Use the safe download-edit-upload cycle
- Select the target file in the remote pane and download it to the local working folder. FileZilla’s transfer queue should show a successful download.
- Make a second copy of the downloaded file before editing. Keep that untouched copy as your immediate rollback file.
- Open the working copy in your code editor and make one logical change set. Avoid mixing an unrelated redesign with a PHP fix; smaller changes are easier to test and reverse.
- Save the file locally, then review the path and filename. A file intended for
functions.phpmust not becomefunctions.php.txt. - In FileZilla, upload the edited file to the same child-theme directory and confirm that you intend to overwrite the remote file.
- Wait for the transfer queue to report success. If FileZilla reports a failed, skipped, or partial transfer, do not test the site as if the upload succeeded; retry or restore the original.
- Refresh the affected page and test the change while keeping the FileZilla connection available for rollback.
Never edit a live PHP file directly in FileZilla’s temporary viewer and assume that the result is saved. A local copy gives you a recoverable version and makes it possible to inspect the complete file before uploading it.
Edit the child theme’s style.css
Keep the required header intact
The header at the top of style.css supplies theme metadata. Preserve the Template line when changing the name, description, or other metadata. Removing or misspelling it can break the parent-child relationship even if the CSS below it is valid.
Add narrowly targeted overrides
Place your child rules after the header and target the elements you intend to change. For example:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →/* Navigation color override */
.site-navigation a {
color: #123456;
}
/* Narrow-screen spacing */
@media (max-width: 700px) {
.site-header {
padding: 1rem;
}
}
The selector must match the markup generated by the active theme. If a rule appears to do nothing, inspect the page’s rendered HTML and the browser’s computed styles before adding increasingly broad selectors. An overly broad rule can alter unrelated pages and make future maintenance difficult.
Confirm that the child stylesheet is loaded
Some themes load the child stylesheet automatically; others require the child to enqueue it. WordPress notes that stylesheet loading differs by theme, so inspect the parent theme rather than assuming one universal method. If the parent does not load the child stylesheet, add an enqueue on the appropriate hook in the child functions.php. A basic pattern is:
<?php
function example_child_enqueue_styles() {
wp_enqueue_style(
'parent-style',
get_template_directory_uri() . '/style.css'
);
wp_enqueue_style(
'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( 'parent-style' )
);
}
add_action( 'wp_enqueue_scripts', 'example_child_enqueue_styles' );
Adapt the handles, dependencies, and loading approach to the parent theme’s existing code. Do not paste this pattern repeatedly or enqueue a second copy when the parent already handles the child stylesheet.
Override parent templates without editing the parent
To change a parent template, copy the file into the child theme using the same filename and relative path. WordPress looks in the child first for an override, then falls back to the parent when no child copy exists.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →| Parent file | Child override location | What must match |
|---|---|---|
single.php |
child-theme/single.php |
Filename and location relative to the theme root |
template-parts/content.php |
child-theme/template-parts/content.php |
Directory path and filename |
inc/section.php |
child-theme/inc/section.php |
Relative path when the parent loads that file directly |
Download the parent template first, place the copy in the matching child path, and then edit the child copy. Do not move every parent file into the child. Copy only the templates you need to change so that unrelated parent updates remain available.
Rank #4
Template parts, additional templates, and patterns can also be added in a child theme where the active WordPress and theme architecture supports them. A copied file has to be used by the parent theme’s template hierarchy or loading code; a correctly named file cannot override a template that the parent never requests.
Add PHP in functions.php safely
The child theme’s functions.php is loaded immediately before the parent’s functions.php. It is additive: it does not replace the parent file. Existing parent functions still load, and the child file is the place to register your own hooks, filters, scripts, and other custom functionality.
Use unique names
Prefix functions, classes, constants, and custom hooks with a project-specific identifier. This reduces the chance of colliding with names declared by the parent, WordPress, or a plugin.
<?php
function example_child_register_feature() {
// Add the feature here.
}
add_action( 'init', 'example_child_register_feature' );
That example is deliberately small. Add one feature at a time and verify that the hook is appropriate for the code you are running. Keep PHP opening and closing syntax intact, and avoid adding a closing PHP tag to a file that contains only PHP because stray whitespace can create output problems.
Do not copy the parent’s entire functions file
Copying the parent’s complete functions.php into the child is not a replacement strategy. Because both files load, duplicate function or class declarations can cause a fatal error. Copy only the specific code you need to adapt, then give your version a unique name and remove dependencies on variables that exist only in the parent file.
Best Value
Activate and test the child theme
- Sign in to WordPress and open Appearance followed by Themes.
- Confirm that the child theme appears with the intended parent association.
- Activate the child theme if it is not already active.
- Open the page type affected by your change, then test a representative post, archive, navigation item, form, and mobile layout when those areas are relevant.
- Check the browser console and the WordPress page output for obvious loading or PHP errors.
- Return to FileZilla while testing so the known-good file is ready if the change fails.
A CSS change may be hidden by a cached stylesheet, while a template change may apply only to one content type. Test the specific URL and content condition that uses the edited file rather than judging the result from the home page alone.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Recover when a PHP edit breaks the site
Restore the file you backed up
- Keep the FileZilla connection open if possible and stop making additional edits.
- In the remote pane, open
wp-content/themes/your-child-theme. - Upload the untouched local copy over the broken file, accepting the overwrite prompt.
- Wait for a successful transfer, then reload the site and the WordPress login page.
WordPress documents FTP restoration as a recovery path. This is why downloading the original before editing is more reliable than trying to reconstruct a damaged PHP file from memory.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rename a broken theme folder when the dashboard is unreachable
If the fatal error prevents normal access and restoring the individual file is not enough, WordPress documents renaming the broken theme folder through FTP so WordPress can fall back to another available theme. In FileZilla, rename the child directory to a temporary name such as your-child-theme-disabled. This does not repair the code; it makes the theme unavailable so a fallback can load. After access returns, restore the original folder name and replace the faulty file with the known-good copy before attempting activation again.
Do not delete the folder during an emergency. Renaming preserves the files for diagnosis and gives you a path back to the previous state.
FTP editing versus other workflows
FTP with FileZilla is useful when you need to see the exact server path and retain local copies. The WordPress Theme File Editor is convenient, but WordPress warns that an erroneous edit can break a site and describes FTP restoration as the recovery method. A deployment workflow adds repeatability when the same change must move through staging and production.
| Approach | Local backups | Recovery if PHP breaks | Remote-path visibility | Credential handling | Repeatable staging-to-production changes |
|---|---|---|---|---|---|
| FileZilla FTP or SFTP | Strong: you download and retain each version yourself | Strong when a known-good file is available for upload | Direct view of the WordPress and child-theme paths | You must protect the saved site entry and credentials | Manual unless you add a separate versioned deployment process |
| WordPress Theme File Editor | Not automatic; you must create a copy before editing | Limited from the dashboard; FTP restoration may be required | Shows theme files in the editor, but not the full server context | Uses the WordPress account rather than a separate FTP login | Weak for repeatable promotion between environments |
| Deployment workflow | Usually strong when files are versioned and reviewed | Rollback depends on the workflow and its previous release | Depends on the deployment tool and repository layout | Uses managed keys or deployment credentials that must be secured | Strongest for staging, review, and production releases |
For a one-off repair or a small site without a deployment system, the local-download and FileZilla-upload cycle is a practical middle ground. For recurring changes, keep the child theme in a versioned local project and use FTP only as the controlled delivery mechanism approved by the host.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesTroubleshoot common child-theme problems
The child theme is missing from Appearance > Themes
- Confirm that the folder is directly under
wp-content/themes. - Confirm that
style.cssis in the child folder’s root. - Check that the stylesheet has a valid theme header and that
Templateexactly matches the parent folder slug. - Make sure the upload did not create an extra nested folder, such as
child-theme/child-theme/style.css.
CSS changes do not appear
- Verify that the edited file is the active child theme’s
style.css. - Inspect whether the parent automatically loads the child stylesheet. If not, add one correctly configured enqueue rather than adding duplicate links.
- Check selector specificity and the browser’s computed styles.
- Reload after the new file has transferred successfully and account for a cached stylesheet.
A template override is ignored
- Compare the child path with the parent’s relative path and filename character for character.
- Confirm that the URL you tested actually uses that template or template part.
- Check that a plugin or newer block-template mechanism is not supplying a different template.
- Download the remote child file again to ensure the edited version really reached the server.
The site shows a fatal error after a PHP upload
- Restore the untouched local file immediately.
- If the dashboard and front end remain unavailable, rename the child-theme directory to trigger the documented fallback behavior.
- Reapply the change in a smaller edit, with uniquely prefixed names and no duplicate declarations.
FileZilla reports permission or transfer errors
- Read the transfer status for the exact filename and remote path.
- Check that you are connected to the account that owns the WordPress installation.
- Ask the host to correct the account’s access rather than changing permissions blindly.
- Do not assume a skipped transfer replaced the remote file; verify by downloading the remote copy again.
A repeatable checklist for every edit
- Identify the active child theme and the exact remote path.
- Confirm the parent slug in
style.cssbefore changing metadata or structure. - Download the target file and retain an untouched copy.
- Edit locally in a plain-text code editor.
- Review syntax, filename, extension, and relative path.
- Upload to the same location and confirm a successful transfer.
- Test the affected page and a second page that uses the same code.
- Restore the known-good file immediately if PHP or layout output fails.
Following this sequence keeps child-theme work separate from parent updates, makes the remote location unambiguous, and leaves you with a recovery file whenever a change behaves unexpectedly.
Quick Recap
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.




