If you own a site that is based on WordPress, it would not be amiss to learn something about the way it all works. So far you have seen how the so-called WEB Interface, and in this lesson I will show you what it consists of, what the application itself looks like, as well as the database from which it draws all the data.
What is currently on the screen is also WordPress. In fact, the files that make up the application itself are shown on the left side, and you can easily recognize them by the WP prefix. The data in special folders (wp-admin, wp-content and wp-includes) are also important for the proper functioning of the program, and I will tell you more about them in the second part of the lesson. Now I want to draw your attention to the right half of the screen, because this is where the complete WordPress database is located. When installing the entire system, I chose the WP prefix for table names, so that’s why they appear in the database.
Every time someone accesses your site, one of these programs is activated in the background. Data stored in special folders also play a big role in this. In fact, this is where the complete content of your site is located, all plugins, themes, add-ons and materials that you have placed on your server in the meantime. However, the most important data is found in the configuration file, because the entire database is managed through it.
As you can see, the database consists of several separate tables, and based on the name, you can easily deduce what is in them. In my case, tables with comments are displayed at the very top of the list, followed by posts, categories and tags, followed by user data, etc. These tables are automatically updated every time you add new data or make a change.
As you can see, with WordPress there is a very strict division into files that represent the system itself and the database that contains all user data. This does not mean that there is no strong bond between them, but it can help a lot if something goes wrong. In other words, if for any reason WordPress stops working as intended, you can very easily remove the program itself and replace it with the correct version. Everything that should be kept in this process is in one file (wp-config) because it contains the complete system configuration. In addition, it would not be a bad idea to save a folder called wp-content, because that way you will avoid transferring images and other supporting files again.
Since I mentioned that the file containing the complete configuration is of vital importance for the functioning of the entire system, it wouldn’t hurt to familiarize yourself with its structure a little better. Therefore, by choosing the appropriate option, I will display its content, which will not be difficult for me, given that it is plain text.
If you used the option of automatic configuration when installing the system, your parameters will not differ much from those you see on the screen. This primarily refers to the name of the database itself (db_name) as well as your username and password (db_user and db_password). The fourth important piece of information is the name of the server where your database is located (db_host), followed by information about the codes used to protect data. Since my system is installed on a local computer, I did not make a special effort to define these keys, but you must do it because it is the best way to prevent any abuses. In doing so, you can also use a special function found on the attached link and automatically generate all the necessary data.
In the second part of the file, there is a parameter that represents a prefix for all tables, and as I already mentioned, without it, it is not possible to establish a connection between the application and the data in the database.
If you want the entire system to function in another language, simply change the parameter called WPLANG. I will not do that, but I will immediately move on to the next segment because I want to explain to you what the parameter called wp_debug is for. It is set to False for me, but if you belong to that group of users who want to keep every segment of the program under control, you can freely change it to True. After that, you’ll be able to check why a plugin or theme isn’t working as you expected, or determine how an error occurred.
On the other hand, for the average WordPress user, all of this should not be a particular burden because the system will most likely function without subsequent corrections. I just wanted to show you how everything is clear and accessible with WordPress and that it is not at all difficult to make a change or upgrade.