• Hi,

    I just installed wordpress and I would like to start hacking it. But I have two questions:

    – What is the logical difference between those files stored at the root directory of wordpress (wp-), those stored at wp-admin, wp-content, and wp-includes directories?
    For instance, there is a file called comment.php at wp-admin directory and another at wp-includes.

    – WordPress comes with 2 themes (default and classic). Is any one of these themes active (I have not done anything yet)? If so, do those files in the directory of these themes have precedence over the same files on wp-admin and/or wp-content and/or wp-includes?
    Can I simply remove those directories?

    To sum up, I want to do some hacking but I don´t understand where!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The .php files are the “components” that build the blog. They tell each piece what to do, how to act and look. The WP- folders divide your blog into logical categories with different functions. If I remember correctly, the Default theme is active. All you have to do is click on a theme and it becomes the active theme. Click on the “View” button above the theme and it will show you what your blog looks like. On the home dash board or in the Design category of your dash board, you’ll find a place to click to search for new themes. There are tons to choose from! You just need to upload a theme into your wp-content, themes folder to try it out. Once it’s in there, you’ll see it as an option in your Design section of the dash board. Click it, and it’s active. You can view it to see what you think. I know WordPress suggests the book “WordPress for Dummies” and it really is helpful.

    One theme needs to be active. So kill just one of them until you get another theme uploaded.

    WP stores theme files under /wp-content/themes/
    It stores plugins under /wp-content/plugins/
    The other directories are the backend of WP and shouldn’t be messed with.
    The only files in the root that should ever be touched, and then not that often, are .htaccess (for your permalink structure) and wp-config.php (used when setting up WP).

    Make regular backups of your database file (*.sql). You can do this either via the Export function in PHPMyAdmin or using a handy little plugin called WP-Backup. The database is the heart and soul of WordPress and contains all your settings, entries, pages, etc.

    I’m getting ahead of myself here, but what the heck. When doing an upgrade, it bears repeating that you’ll want to delete all the WP files and start with fresh files from the distro. This ensures that there is no corruption upon upload/overwrite. NOW, that being said, there are several files that you should NOT delete during an upgrade process. These are:

    Any custom theme files (although I would presume that you’d have copies of them on your hard drive)
    .htaccess
    .wp-config.php (this contains the WP database information and without it, WP cannot live!)
    robots.txt
    Any custom language files

    Everything else can be nuked and you can upgrade from there. Just FYI for the future. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress file structure’ is closed to new replies.