Here’s the scenario: You just changed the URL to your website. Everything seems to be going great, until you go to edit one of your pages. You click “Edit with Divi,” and you get nothing but a white screen with this terrifying message:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at firstname.lastname@example.org to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error was encountered while trying to use an ErrorDocument to handle the request.
This will happen on every page when you try to use the Divi builder. This is the infamous Divi Internal Server Error. But don’t worry! There’s a simple hack you can use to fix this. Here’s a step-by-step on how to do it:
- Go to your WordPress dashboard, then in the left-side column, click General>Permalinks.
2. Scroll down until you see a blue “Save changes” button. Click it.
This problem is created when you change URLs because when you fire up Divi, it still has your old URL in its database, so it’s looking for that URL. When the old URL doesn’t match up with the new one, you get the Divi Internal Server Error. But when you click “Save changes” on the permalinks page, WordPress goes through the database and changes all the old URLs to the new URLs. Then like magic the Divi Internal Server Error is gone!
A related problem is the WordPress website is working, but the login page doesn’t work and gives a similar error. You can read about how to change your WordPress website URL manually in your database, but suffice it to say, it can get complicated. Typically, you’ll want to hire a professional developer or web development agency (such as Brain Jar, of course) to handle this for you. Otherwise, you should level up your skills with online resources (such as the Free Code Camp) or vocational training programs (such as WP Code Camp).
How does the WordPress database work?
WordPress, being a content management system (CMS), utilizes a relational database management system (RDBMS) to store and retrieve data. By default, it relies on MySQL as the RDBMS, but it can also work with other database systems like MariaDB, PostgreSQL, and SQLite.
The WordPress database structure is designed to organize and manage various types of content, configurations, user data, and other essential information. It consists of multiple tables, each responsible for storing specific data related to different aspects of a WordPress website.
When you install WordPress, it creates a default database with a prefix (usually “wp_”) followed by table names. The most commonly used tables in a WordPress database include:
- wp_users: Stores user-related data such as usernames, passwords (hashed), email addresses, and user roles.
- wp_posts: Contains the content of your website, including blog posts, pages, and custom post types. Each entry in this table represents a single piece of content.
- wp_terms and wp_term_taxonomy: These tables store information about taxonomy terms, which are used to categorize and organize content. For example, categories and tags are stored here.
- wp_comments: Stores comments made by users on your website. It includes details such as the commenter’s name, email, comment content, and the post or page it belongs to.
- wp_options: Holds various settings and configurations for your WordPress website, such as site title, site URL, theme settings, and plugin configurations.
- wp_links: If you have the Links feature enabled, this table stores the data related to your blogroll or a list of links.
When a user visits a WordPress website, the WordPress core software queries the database to fetch the necessary information to display the requested page. The process typically involves the following steps:
- Connection: WordPress establishes a connection to the database using the database credentials specified in the wp-config.php file, which is located in the root directory of your WordPress installation.
- Query Execution: WordPress constructs SQL queries based on the requested page and the data required. These queries are sent to the database for execution.
- Data Retrieval: The database system processes the SQL queries, retrieves the requested data from the appropriate tables, and sends the results back to WordPress.
- Data Rendering: WordPress then takes the retrieved data and uses it to generate the HTML content of the requested page. This includes applying the appropriate theme templates, formatting the content, and incorporating any plugins or customizations.
- Page Display: Finally, WordPress sends the generated HTML to the user’s browser, which renders the page and presents it to the visitor.
Additionally, WordPress uses a database abstraction layer called the WordPress Database API. This API provides a set of functions that handle database interactions, making it easier for developers to work with the database without having to write raw SQL queries.
The WordPress database can be extended and modified using plugins and themes. Plugins can create additional tables or add columns to existing tables to store custom data. Themes can utilize custom post types and taxonomies, which are stored in the database, to handle different types of content.
Regular database maintenance, such as optimizing tables, performing backups, and ensuring database security, is crucial to keep a WordPress website running smoothly.