I’m constantly reading stuff on the wordpress forum where people are making all mannar of customizations by modifying php or css files using the file editor. But aren’t all those files generated? Don’t these files get reverted when a change is made to the website through the wp-admin console or when wordpress updates?
Leave a Reply
You must be logged in to post a comment.
Updates run for themes and plugins only if there is a registered update server. If you have a custom (child) theme, or a plugin not hosted on wordpress.org and without a custom update mechanism there will be no updates.
In all other cases: Yes, you are right, the changes could be overwritten.
But this is not the only problem. Editing files per back-end may have side effects:
I recommend a simple mu-plugin with just one line of code:
This will disable the file editor.
@BarryCarlyon recommends the
wp-config.php
for this. Thatâs a valid point; I prefer a mu-plugin because it easier to see in back-end why something doesnât work when there is a dedicated plugin.Files don’t generally get reverted back when a change is done in the wp-admin console. But, yes, files with your modifications will generally be overwritten if the theme is updated.
So, you should first determine if the theme you are working on will get updated via the WordPress update system. If not – which usually applies to custom made themes – then you can do your customizations without fear of your changes being overwritten.
If the theme you are using could be updated however – like themes downloaded from WordPress.org – then it would be best to first create a child theme off of it and do your changes to the child theme instead.