0

I am new to WP. I tried reading up as much as I possibly can online, and via browsing through the files. As far as I can tell, no physical pages/links are stored on the disk, so when a page is created, the data is stored in the wp_posts table, and the post metadata is in the wp_postmeta table. My questions are:

  1. I am assuming that nothing is stored to disk, with the exception of uploads that go into the wp-contents/uploads directory. Is this correct?

  2. Are there any other tables involved in the posts? as in, if I delete the post from the wp_posts and all relevant data from the wp_postmeta, does that get rid of the post?

  3. How does WP know if this is a page or a post? which table is that info stored in?

  4. Are the wp_comments and wp_commentmeta tables the only tables involved in comments. As in, if I write as script to delete a comment from this table, along with its metadata, will that completely eliminate the post?

  • 2
    There are a lot of questions here, answering correctly and comprehensively will take a large amount of time and effort, equivalent to a small novel. Increase your chances of good answers by breaking your question up and asking multiple questions on the site. Link between them for greater context. How WordPress gets from a URL to a post and template to load itself is an in depth topic even without the 4 bullet points you added – Tom J Nowell Oct 14 '15 at 21:46
1

Wordpress has a predefined folder structure and runs on a database with a clearly defined structure. The description of the tables and the relationship between them is defined.

  1. You can store on the disk the plugins as well as the content that goes into /uploads, like you've mentioned.

  2. Yes, it should get rid of the post.

  3. in wp_pages table in the field post_type. You might find the template hierarchy also useful, with this you can customize posts, pages, categories etc
  4. Yes, it should get rid of the comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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