Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I begin to work with Wordpress, I'm developing a theme with many functionnalities into it, and I'm good with that.

My question does not have to do with theme development, but more with general knowledge about Wordpress. I would like to know which files are safe to edit in a standard Wordpress installation : files that will not be overwritten when we perform an update of Wordpress for instance.

I know of wp-config.php, but are all others at the root safe too ?

I ask this because I want to add filters in my Wordpress website and those filters will be independant of a plugin or a theme. Currently I added them in wp-settings.php but I found nowhere if this file is safe to edit.

share|improve this question
1  
Core files will be overwritten on updates, so its not save to edit them. Don't know what you are actually doing, but maybe you should ask another question, how to implement that without changing core files. Give some background information, so people really can help you. Besides that, personal statement, do not edit core files, in 99% there is another way anyway, because later on, when a update is needed, it is a real pain to resolve those core edits. I know, because I regularly do that #$%7§! for clients.. –  ialocin Sep 4 at 12:15
    
If you're doing theme/plugin development the safest way to add functionality is to use the functions.php file or the plugin class. There are already a lot of filters to use to modify output and WP functionality. So my real question is why are you trying to modify the install instead of building on the platform. –  Greg McMullen Sep 4 at 12:18
    
Thanks for your comments, but I found nowhere what are core files (which should not be edited). Are all files core files, except wp-config.php? I understand I should not do what I did, and try to install my filters in the functions.php of my theme. –  MaxiWheat Sep 4 at 12:28
    
From your comment I tihnk that you know about the filters API and how to add custom filters to Wordpress but you want to add theme without being coded in a theme or in plugin. Have I understood correctly? Can you explain why? I can't imagine a situation where you may need that. –  cybmeta Sep 4 at 12:29
2  
Consider everything that comes with a vanilla WordPress installation a core file. E.g. wp-config.php isn't a core file, because it comes only with the sample version of that file. –  ialocin Sep 4 at 12:34

1 Answer 1

up vote 2 down vote accepted

Consider everything that comes with a vanilla WordPress installation a core file. Core files will be overwritten on updates, so it's not safe to edit them. E.g. wp-config.php isn't a core file, because the vanilla installation comes only with the sample version of that file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.