WordPress Architecture with Diagrams Explained (Tutorial)

WordPress Architecture with Diagrams Explained. WordPress has a file structure that can be confusing at first. Well WordPress allows you to keep your site content organized and easy to manage. The WordPress file and directory structure are crucial in creating a professional website that works.

Foremost WordPress is a powerful system that allows you to add features to your site and manage user accounts through a single dashboard. It can also be confusing if you’re new to WordPress or want to perform routine tasks (like SEO).

Let’s start with our article WordPress Architecture with Diagrams Explained.

Understanding WordPress file and directory structure

You should know about WordPress files and directory shape to guarantee that you’re making use of the most out of your site’s functions. The documents incorporate code that powers your site. 

WordPress root directory

Firstly WordPress is among the most well known and utilized blogging platforms on the planet. It’s free, easy to use, and can be installed on almost any server. But because WordPress is so the user doesn’t mean it’s a simple process.

The best way to start using WordPress is to deploy it to your web host. Most net hosts will try this for you whilst you first create an internet host account. Or, you could download WordPress and add it to your server yourself.

Once you’ve downloaded and installed WordPress, you’ll need to set up the files that make up your website, the template files, plugins and themes onto your server.

This is called uploading or installing WordPress; it copies all these files from your computer into your web host’s public_html folder to create a functioning website.

WordPress core files and folders

The WordPress Core files are the documents and folders that define what you see when you log in to your website. They set up the login web page and the admin dashboard, as well as the database connection and handling users.

There are two middle WordPress folders: wp-admin and wp-includes, and lots of documents.

wp-admin folder

As the name suggests, this folder manages your entire WordPress wp-admin dashboard experience. There are 7 folders in the wp-admin folder as follows:

  • CSS.
  • Images.
  • Includes.
  • Js.
  • Maint.
  • Network.
  • User.

wp-includes folder

The wp-includes folder is where all the basic software for your WordPress site resides. You’ll come across it in several ways: packages, code libraries and WordPress source code. BOM is not important here, but code is crucial.

Thus, it is not advisable to change anything in the wp-includes directory as this can and will break your site.

Moreover, there is no good reason for this. You rarely come across a tutorial that recommends that you change the code in the wp-includes directory.

WordPress core files

Index.php

This is the part of the WordPress  installation process where you set up your index.php file. It’s what displays your site to visitors and loads the core files when a page is requested.

If there is no index.php file, then all the contents of the root directory will be displayed in the browser when someone tries to visit your site.

This is a security issue because it allows anyone with access to that directory to view the content of the entire site. This can also make it easy for hackers to find vulnerabilities in your site, which they can then use to exploit them and get access to even more sensitive information.

The index file is a directory level file and is visible in most directories and subdirectories. For example, it also exists in the wp-content folder. If that file was missing, the contents of the folder would be visible at present (but not recommended).

At present, a blank white screen appears instead (which can be quite scary for visitors).

What are WordPress config files? Keep on reading WordPress Architecture with Diagrams Explained.

WordPress configuration files

You’re familiar with the idea of having a WordPress site, but not as familiar with all the files that make up your site. If you want to know what’s happening when a visitor comes to your website, here’s a quick overview:

  • wp-config.php – This file contains your server information, like the hostname and port number.
  • wp-settings.php – This file contains information about how you set up your blog (like the title). It also includes settings for things like whether it should show images on the front page or whether you should use HTTPS when loading pages.
  • wp-content/uploads — This folder contains images and other media that have been added to your site (like videos or PDFs). It also contains any other files that are needed by WordPress (like JavaScript files).
  • wp-content/plugins — The plugins folder is where you would find plugins that add features to your sites, such as advertising or social media sharing buttons.

Each plugin has its folder here so that it can be found in WordPress’ Plugin Manager interface. Themes don’t appear in this folder; instead, themes are located in their folder under /themes.

Understanding WordPress database tables

If you’ve ever tried to install WordPress on a computer, you know that there are a lot of steps involved in setting up everything.

First, you have to install the software (in this case, WordPress). Then you need to create a MySQL database user for your site and ensure it’s set up.

After that, you can start creating content using your website’s editor—the place where you write posts and pages. How do you find exactly what you’re looking for?

It’s here that the database comes in handy: the database stores all your site’s content in tables. This includes posts, pages, comments—everything!

To find specific information about one piece of content, like a post or page title, type its name into any text box on your site and click Enter. You’ll see its details appear in a sidebar or dropdown menu so that you can find them again later!

The Core WordPress table looks like this:

  • wp_options
  • wp_users
  • wp_usermeta
  • wp_posts
  • wp_postmeta
  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy
  • wp_comments
  • wp_commentmeta
  • wp_links

These tables are installed with WordPress. Over time, as the site grows and plugins are added, the database grows with more tables and thus more data.

It is important to remember that tables often work in tandem with each other. This means that data can be retrieved from different tables.

For example, comments on posts are stored in the wp_comments table, but wp_commentmeta is also important for recovery. This is especially true for WooCommerce sites, where order and product data are stored in many tables.

How to access the WordPress files, directories and database

Next with WordPress Architecture with Diagrams is to access your WordPress site on a web host server. This is a remote computer that hosts your website and stores its data. To access the file structure and database, you need to log in to this computer.

There are several ways to do it, but there are also pros and cons associated with each method. It’s worth researching all them and deciding which one is right for you.

cPanel

Accessing cPanel is what most WordPress tutorials recommend. Yet, it’s not a necessity for every site.

A lot of people love cPanel because it has tools for almost everything you could ever want to do with your site. But some people don’t like it because they have a bad experience with their host’s customer service or have other hosting options they prefer.

If you’re looking for a way to view your WordPress files and databases, the File Manager and phpMyAdmin are your best bets.

FTP/SFTP

You may have heard of the HTTP protocol, but do you know how it’s different from FTP and SFTP? If not, we’re here to help.

The File Transfer Protocol or FTP is an alternative to HTTP. We are all familiar with HTTP, a protocol for transmitting information on the Internet.

Here the FTP differs from HTTP in one key way, which is that it requires authentication. This means you need to provide credentials to access the server.

If you don’t want to mess around with settings or downloading software, there are other options available for accessing your files from any device or computer.

SSH

If you’ve ever tried to access your site’s files over FTP (or any other network connection), you know that it can be a bit tricky. It’s not hard to install, but it requires some setup and configuration before you can use it.

SSH stands for “secure shell.” It’s a way to connect to a remote computer over insecure networks. In the case of WordPress, you can use it to access files on your site’s server from anywhere else.

Command used in SSH is a command line interface to communicate and manage site files and directories rather than a browser. As with FTP, a client may be required to use SSH, although most systems have the functionality built in.

Plugins

If you’re looking for some better ways to manage your website and keep it running, there are a ton of plugins out there that can help.

The first thing you need to do is find a good plugin. We tried WP File Manager and it was a breeze! find the plugin in the plugins folder, install it, and that’s it.

Once installed, you’ll be able to view and interact with WordPress files and folders right inside your wp-admin dashboard without having to log in.

The advantage of using a plugin like this is that you don’t have to worry about cPanel or FTP anymore—you need WP File Manager installed!

But here’s the thing: if your site crashes for some reason, or if you want to fix a faulty plugin or theme… well then, unfortunately, none of those plugins will work anymore with your current setup.

And if you try installing one from wordpress.org/extend/plugins instead of using the official plugin repository on wordpress.org/extend/plugins (which is what most people do), you might end up getting errors when trying to install

Thank you for reading about WordPress Architecture with Diagrams Explained.

WordPress Architecture with Diagrams Explained Conclusion

The WordPress Architecture is a great way to understand the structure and functions of the WordPress platform. It’s a great tool for anyone who wants to learn how to use the popular blogging software.

Now that you know your website well, it makes sense to create a backup whenever you want to change something. It’s your safety net in case something goes wrong and you need to recover it.

This article shows all of the different parts that make up this popular content management system, from the database to themes, plugins, and more.

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

1 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x