admin管理员组

文章数量:1287580

Is there a way to check which files are part of vanilla Wordpress? I am working on a custom Wordpress project that has a lot of added parts to it and I was wondering if there was an easy way to check which files were added.

Inside of root there's a folder website, among other things, and inside website there's a folder called public, among other things, and then inside folder we have the folders wp-admin, wp-content and wp-includes. So I am wondering if every other folders are not part of the vanilla Wordpress. Also, what folders should vanilla Wordpress have inside wp-admin, wp-content and wp-includes and can other non-Wordpress files use files inside those folders?

Is there a way to check which files are part of vanilla Wordpress? I am working on a custom Wordpress project that has a lot of added parts to it and I was wondering if there was an easy way to check which files were added.

Inside of root there's a folder website, among other things, and inside website there's a folder called public, among other things, and then inside folder we have the folders wp-admin, wp-content and wp-includes. So I am wondering if every other folders are not part of the vanilla Wordpress. Also, what folders should vanilla Wordpress have inside wp-admin, wp-content and wp-includes and can other non-Wordpress files use files inside those folders?

Share Improve this question edited Oct 5, 2021 at 23:33 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Oct 5, 2021 at 21:19 user214276user214276 1
  • You can check the official WordPress GitHub repository, all the files that WordPress needs are there: github/WordPress/WordPress. – Laloptk Commented Oct 6, 2021 at 1:44
Add a comment  | 

2 Answers 2

Reset to default 0

Most customisations are done in the theme. If it's a default theme (came with WordPress) I'm hoping someone built a child theme or a custom theme so that customizations will not be deleted when you automatically update the theme. Everything in the child theme and plugins will be your customization.

The theme will be in the wp-content/themes folder. Plugins will be in the wp-content/plugins folder.

A common theme file where code is added to customize the theme is functions.php. Basically, any file in the theme folder is customization.

The three folders that come with WordPress are wp-content, wp-admin, and wp-includes. There are a few files in the root that are shipped with it also. The main one being the wp-config.php file, which is used to connect with your database and settings outside of the database.

The wp-content folder also contains any uploads. It's the only folder that should be modified.

Download a fresh copy of WP and you will see exactly which are the vanilla files. Never modify these files other than to update to a newer version of WordPress.

Other than wp-config.php, all modifications will be inside the wp-content folder, in either themes or plugins.

Also, what folders should vanilla Wordpress have inside wp-admin, wp-content and wp-includes and can other non-Wordpress files use files inside those folders?

Never modify wp-admin or wp-includes, do not add additional files and folders. Modifying WordPress Core, or adding new files has major security issues, and will be erased on the next WP auto-update.

If you need to modify WP behaviour or add logic, do it via the provided APIs from inside a theme or plugin.

and can other non-Wordpress files use files inside those folders?

You can "bootstrap" WP aka load it but loading individual WP files from outside of WP rarely works. You're likely to encounter issues as WP isn't designed that way.

本文标签: installationIs there a way to check which files are part of vanilla Wordpress