How to fix errors in wordpress. Common WordPress Mistakes and Issues Problem installing wordpress template

Let's take a look at common errors in WordPress and what to do to fix them.

1. Internal Server Error- How to Fix Internal Server Error in WordPress

Another common error that WordPress users may encounter is “Internal Server Error” or sometimes “500 Internal Server Error”. This error often occurs when something has gone wrong but the server is unable to determine the problem. Since the error message doesn't tell you where to look for it, you'll have to deal with it yourself. We have compiled a list of solutions to this problem, and one of them should help you deal with this error.

  • Plugin or theme features
  • Corrupted .htaccess file
  • PHP memory limit exhausted
  • When trying to access the admin panel while the site is running fine

2. Error Establishing a Database Connection

The message contains a clear indication that your website cannot connect to the database. However, solving this error can be tricky for beginners. Usually, this happens when the user entered incorrectly or changed Accounts databases (hosting, username, password). Another reason may be that there is no server response or the database is damaged. However, in most cases, these tend to be the wrong login accounts.

3.Deadly white screen

This error usually shows up as a completely white screen on your machine without any error messages, which makes it especially difficult since you have absolutely no idea where to look for it and how to fix it. In most cases, the reason is that the script has reached its PHP memory limit. The reason for this may be: one of the plugins that does not function properly; a poorly coded theme template that you use on your site. This can also happen due to the configuration on the server. It is also possible that the user will only see a deadly white screen in certain areas of the site.

4. WordPress Posts Error 404 Not Found

The symptoms of this error occur when a user visits a particular post on their site and receives a 404 -page not found error message. At the same time, the user can view all other sections of his site, including the admin panel. The most common cause of this issue is the permalink setting in WordPress. To solve this problem, the user must reconfigure permalink settings or manually update the rewrite rules.

As mentioned above, the user has access to the administrative panel, to home page my blog, but when I try to access individual posts, I get a 404 error not found. This usually happens because the .htaccess file has been deleted or something has happened to the rewrite rules.

5. The sidebar sits below the content

Another common problem new WordPress users may encounter is that the sidebar appears below the content instead of on the side as it should. The reasons for this error, in most cases, are related to themes. Sometimes when users add code snippets to their site, they may accidentally forget to close the " html div” or add an extra closing div tag, which can break the layout of the theme. Another common mistake is using a disproportionate width in CSS, or cleaning up the float incorrectly (float is css property positioning, simplified left-right, etc.)

Check everything you've changed recently. Added a new plugin? Have you made changes related to HTML? If your page or post content has block tags

, make sure they are properly closed. One of the best ways to find bugs is to use the W3 Validator. (Just enter your URL into the box and you'll get a list of errors in a few seconds).

6. White Text and Disappearing Buttons in WordPress Visual Editor

Sometimes the buttons on the WordPress visual editor panel may disappear or have a white space instead. This issue can occur when the included JavaScript does not work in the user's admin panel, missing or corrupted TinyMCE files, or a conflict with some other plugin that modifies or extends the TinyMCE that comes with WordPress.

7. Exhausted memory limit on WordPress (WordPress Memory Exhausted Error) - increase PHP memory

Symptoms of this error can be a deadly white screen or an error message like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/site1/wp-includes/plugin.php on line xxx ( Fatal error: allowed memory size exhausted (an attempt was made to allocate 2348617 bytes) to folder name on line xxx)

This error occurs when a WordPress script or plugin runs out of its default memory limit.

How to fix this error. Open your wp-config.php file located in your WordPress root folder. Add next line inside your php tag.

define("WP_MEMORY_LIMIT" , "64M");

This way you will increase the memory limit to 64M. If the error persists after this, contact your host. Most likely they will go into their php.ini file to increase the memory limit for you.

8. How to Fix Syntax Error in WordPress

This error often occurs when you are trying to add code snippets (code snippets) to WordPress and accidentally missed a character or letter, or the code itself is written incorrectly. As a result, a PHP parse error pops up and you see a message in front of you that looks like this:

Parse error - syntax error, unexpected $end in /public_html/site1/wp-content/themes/my-theme/functions.php on line 278 -content/themes/my-theme/functions.php on line 278)

The error message contains an indication that something extraneous was found in the code, as well as the location of the script where the error was found with a line number. To fix this error, you must correct the syntax. In most cases, this is an omitted parenthesis, or some extra character in the code.

Let your sites work without errors!

(Total visitors: 212, today: 1)

Hello to all readers! Today we will learn how to solve the most common problems that you may encounter while using various modern WordPress themes. Surely many advanced users already know these solutions, but for beginners, I hope the material will be useful.

You just downloaded or bought a cool theme, installed it and see this message:

Perhaps your first thought was this… “the developer tricked me and slipped me a theme without a stylesheet”

Of course, it is possible that your zip archive did not contain css file, but the problem is probably that you just didn't get to the theme's root folder.

Solving the problem with the missing style sheet

Find your theme folder on your desktop and open it (if it is packaged, unzip it and open it). You should now see all the theme files, if not, then the theme is probably in a subfolder. In general, the folder is usually named the same as the topic. The found folder, pack it into a zip archive and upload it using WordPress or just upload the unpacked folder via FTP.

Now at theme, you decide to download the sample .xml file that the developer kindly provided you, and again you get this error.

Solving Failed Import Problem #1

There are two reasons for the problem. The first is that you are trying to load a post or taxonomy from a custom post type that no longer exists.

  • Activate Theme: Make sure the theme you want to use is active
  • Double check your theme: make sure your theme includes custom post types and taxonomies - talk to the developer if you don't know what to look for yourself.

Solving Failed Import Problem #2

The cause of errors that look like “Failed to import Media” may be undownloaded images

  • Have you checked the box responsible for importing attachments? You need to check if there is a checkmark next to "Download and import attachment files".
  • Pictures available? It is possible that the pictures are not available on the server. You can open the sample data in text editor and try to find one of the problematic files, and then test the link in the browser. But the easiest way is to tell the developer that the pictures are not downloading.

For many, it would be great if any activated theme immediately looked like on the demo? But in reality this does not happen.

So you've installed the theme (and its demo content), but your site doesn't match what the theme demo looks like, and there are several reasons why your home page looks different.

Solving a display problem home page № 1

Reading settings are not correct. This means that your theme requires or does not require a home page, while your site does the opposite. Go to Settings > Reading and explore the options in “Display on homepage.”

If your theme does not require any template for the homepage layout, make sure this option is set to ”your the last notes.” If your theme uses a home page template, make sure your site is using a static page.

Solving homepage display issue #2

You need to use the homepage template. Many theme developers use page templates for their homepage layouts. So read the documentation first, but if there is nothing there, then start creating the page by looking in the editor, section Page Attributes > Template, to see if there is a template like Home, Homepage or Front page. If so, you will probably need to create a page using this template, then save/publish it, go to Settings > Reading to enable the "static me page" option.

My URLs are “ugly”

The default WordPress link structure is not very pretty and is not at all SEO friendly. So when you first set up your site, the URLs might look ugly (a hodgepodge of post ID, post date, and even categories), but don't worry, it's easy to fix.

If your urls don't look great (yoursite.com/?p=1) go to Settings > Permalinks and select the Post Title option (or whatever works best for you).

If you have posts that are giving 404 errors, don't panic as they are most likely still there and you just need to update your permalink settings to fix this issue. This problem very often accompanies topics that use custom post types, so if you have such a theme, then after activating it, you need to restart your permalink settings.

What to do if posts give a 404 error?

To solve the problem, go to Settings > Permalinks and click the "Save" button. If this trick didn't work, then you may need to manually update your .htaccess file.

My menu is a blank slate

If you use WordPress on a daily basis, you are unlikely to experience this problem, but if you are new to WordPress or have resumed using it after several years of inactivity, then you may be surprised by the empty menu that appeared after installing the theme.

The default WordPress theme has a built-in WordPress menu fallback in case none is installed, but not all themes have this.

Make sure your menus work. To do this, go to Appearance > Menu to set your menu.

  1. Make sure you have a menu. If none exists, then you need to create one.
  2. Make sure the menu is attached to the location. Below your menu you should see “Display Locations” which are the menu areas built into your theme. Some themes have only the main menu location, others have multiple locations. Select the desired option and save the result.

The new theme uses post thumbnails, but I have a bunch of posts without them

Prior to version 2.9, WordPress did not support post thumbnails, so many themes used meta options or custom fields to define thumbnail images, or had no default post images at all.

So maybe you switched from old topic to a new one that supports image thumbnails or your previous theme was so minimal it didn't use them.

What to do if post thumbnails are missing

The simplest solution is to use the Easy Add Thumbnail plugin, which automatically adds post thumbnails to old posts. Just install it, activate it and follow the instructions to add pictures to old posts.

Many WordPress themes these days use java-script/jQuery to add image sliders, sliders, accordions, tabs, mobile menus, and more.

If these functions did not work initially or suddenly stopped working, then it is probably a javascript error.

How to fix broken sliders, sliders, tabs, etc.

First things first, disable all plugins, clear all cache, and reload your site to see if everything works as it should. If all is well, then start activating the plugins one by one, as this will allow you to identify the problematic plugin.

Now you know which plugin(s) caused the error and you can, for example, find another plugin with similar functionality.

You change styles but nothing happens

So you want to change appearance your theme to have its own character, and add custom CSS to your site, or modify the styling page, but no matter how you update the site, the changes do not take effect.

How to revert style changes

So, you need to do the following:

  • Disable Cache: Most often the problem is that some caching plugin like W3 Total Cache is caching your CSS. In this case, it must be disabled.
  • WordPress Customizer: If you are using the Theme Customizer, you must click on the save button and then refresh the page to see the effect.
  • Can't Change Background: If you're just trying to change the background using the WordPress background panel, you may encounter this issue if your theme uses a set background image. Try uploading a new image as a test image, as it should overwrite the old one. You can also load a 1px solid color and adjust it so that it repeats.
  • Changes in the WordPress Editor: If you try to make changes using the WordPress Editor in Appearance > Editor, then the changes are not always saved due to server permissions, but in this case you will get an error.

Most likely the cause of this error is that you made these changes directly in the style.css file (usually). Then, when the theme was updated, the edited files were overwritten with the default theme code. That's why we don't recommend making changes directly to the original theme.

Solving the problem with missing changes

If you have not made a backup of the site that you can use to restore it, then the changes are gone forever. If you have a backed up copy, then you can restore the theme files via FTP.

Now, let's try to prevent this problem from occurring in the future. If you want to make any changes to the theme, then use something from this list:

  • Custom CSS plugin. If you need to make a couple of minor tweaks, you can use a custom CSS plugin. Here are the options:
  • CSSHero Visual CSS Editor
  • Create . Creating a child theme is probably The best way customizing your theme. You get a huge amount of power, and you can even customize template files, not just style.css, remove or add scripts, and manage custom functions.
  • Take care of full website backups. In case something goes wrong, you need to have a complete backup site. For Reserve copy You can use one of the following plugins:
  • VaultPress – WordPress Backup and Security
  • WordPress Backup Plugin
  • Updraft Plus Free WordPress Backup Plugin
  • Keep a log of changes. Whether you're editing theme files manually or with a child theme, it's best to record all the changes you make so you remember all the tweaks you've made and know which one caused the error.

Conclusion

If you did not find a solution to your problem in this article, then try searching it on Google. And if you didn’t find it there, then contact the author of the plugin or theme, and also go to the official Envato forum or to the domestic forum

Has the site gone down yet again? Got a white screen or 404 error? Any problem in WordPress can be solved, and this does not require “special” CMS skills. We will tell you about the most common WordPress errors and problems and describe how to fix them. Full list of common mistakes:

  • 500 internal server error
  • Error Establishing A Database Connection
  • HTTP Error 403 - Forbidden
  • Connection Timed Out
  • Warning: Cannot Modify Header Information – Headers Already Sent By
  • WordPress Posts Returning 404 Error
  • fatal error Undefined Function is_network_admin
  • WordPress Memory Exhausted
  • WSOD- White screen of death

1. 500 Internal Server Error

One of the common causes of this error is an incorrectly configured .htaccess configuration file located in the root directory of the site. There are 3 solutions:

1. If you made changes before the error occurred, go to the server, open the .htaccess file in notepad and delete the last added lines of code.

2. Remove given file and go to WordPress Settings, click on the Permalinks tab and click the Save button. A new file will be created in the root directory and the site will work as before.

3. You can view the report in the error_log file, which is kept by default by the hosting and is located in the root directory of the site.

2. Error Establishing A Database Connection

The system cannot connect to the database. Main reasons and solutions:

1. MySQL server is down. Usually occurs on VPS servers. You need to restart the server. If the problem is not solved, write to the hosting support.

2. Misconfiguration file. It is possible that the data (login, password and database name) is incorrectly entered in wp-config.php. Check the file by opening it in notepad. It is important that all parameters are written in quotation marks.

3. There is no access to the database. You may have limited access to the database, which is registered in the WordPress settings. Change permissions and check if it works.

4. You have been hacked. Many WordPress sites are hacked, so if such an error occurs, check the entire site in the service https://sitecheck.sucuri.net

3. HTTP Error 403 - Forbidden (Problem with index file)

1. You have the wrong index file on your server. Carefully watch the format - php, html, etc. In some cases, the file is simply missing. In that case, create it.

2. The problem with the rights. Maybe you have restricted permissions on index. Execute permissions for the file and parent categories must be present.

3. The file has been uploaded to a different directory. Find index and move it to the root folder of your site.

This problem is extremely rare. Most often, it can occur during hacking.

4. Connection Timed Out

It mainly occurs when the server is rebooted, unavailable, has been subjected to a DDOS attack. What can be done:

  • Remove plugins that were previously installed on WordPress
  • Increase the amount of RAM on the server, for the WP engine
  • Set default engine theme
  • Restore a working site backup

5. Warning: Cannot Modify Header Information – Headers Already Sent By

Appears mainly due to spaces in files with php code. The parentheses after the error name will indicate the file and line number where the error occurs, for example, (/category/wp-settings.php:45 ). This means that there is an error in the wp-settings.php file on line 45!

Upload this file, open Notepad or NotePad++ with code highlighting, and remove the spaces. Save the file and re-upload on the site, check the performance.

6. WordPress Posts Returning 404 Error (Page Not Found)

1. You deleted the page and it no longer exists.

2. Permalink settings not configured. Go to "Settings" - "Permalinks", select the type of links you need and save the changes.

3. Incorrectly configured .htaccess file. If the second point does not help, open this file and add the code:

# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %(REQUEST_FILENAME) !-f RewriteCond %(REQUEST_FILENAME) !-d RewriteRule . /index.php [L]# END WordPress

7. Fatal Error Undefined Function is_network_admin

System automatic update crashed. In this case, you need to “roll back” the site to a working version, and then run the update again or run wordpress update in manual mode.

8. WordPress Memory Exhausted

1. Log in to the server and see how much is available to you random access memory, as well as how much is allocated for a particular site.

2. Modify wp-config.php file settings by adding more memory. Find the line define("wp_memory_limit", "64M");, and change the value 64 to something else. Please note that you cannot enter more than your server provides!

3. Plugins use a lot of RAM. We advise you to disable the problematic plugin and find a replacement for it. You can check the load of each module using the P3 Plugin Profiler.

9. White screen of death

One common problem is installing or editing plugins before the WSOD error occurs. It can also occur due to conflicts of add-ons, unfinished plugin updates.

1. Rename the plugins directory, and create an empty plugins folder. Move one plugin per directory to find the conflicting plugin.

2. You can change the theme to go to the admin panel and make changes. Change the name of the template on the server to the standard one.

Is not full list errors that may occur while running WordPress. As a result, we can conclude that most problems appear due to conflicts or incorrect installation of plugins, incorrect data in the configuration WordPress file, "buggy" updates or hacks. Be sure to review the reports in your server logs for each site.

Today, I would like to talk about how to install themes on wordpress. After all, after creating a blog and its basic setting, we definitely need to make a resource not like others or with some kind of zest, but how to do it? Of course by setting the theme. But, if possible, it should be unique, although you can use standard WordPress templates or themes that can be found on the Internet, in the public domain, and you can also buy a template for a blog. But the most the best way is a unique template that no one else has, because the theme of our site is its face, which the visitor remembers and can recognize our blog among others. And when it is standard or frequently used on many resources, your resource will be lost in this crowd of blogs or sites. Therefore, let's consider how to install themes on wp.

Method 1: Installing a wordpress theme using wordpress search.

First, in the WordPress admin area, you need to go to install themes. To do this, on the left, in the menu there is an item " Appearance", And in this section there is a subsection" Themes«. We need it today to install the template on WordPress. After going to the subsection, you can see two tabs - we need the second one, called "install themes".

Using the search, choosing a template is quite simple, just specify the criteria you need and click on the “find topics” button. This shouldn't be a problem. After clicking, pages with topics that must match your criteria will appear. There will be descriptions for each, though not in Russian, but now web browsers can translate, so there should be no problems either. Each template will also have two possibilities, installation and viewing. That is, before you finally decide to install a theme on wordpress, you will have the opportunity to “view” it and study it in more detail. And after that, decide whether to install or not.

To install, just click on the "install" button and confirm the installation. After that, you will see a message about the successful installation and all that remains is to activate the WordPress theme.

Also, with wordpress search, you can set a template by typing a keyword, author or tag in the search form. But this function does not work very well. It can be used knowing the exact name or at least a couple keywords from the title.

It's as simple as that, you can install theme for wordpress using search.

Method 2: Installing a wordpress theme by downloading it from the WordPress admin panel.

The next installation option is no more difficult than the first. You need to find a theme on the Internet and download it to your computer. Please note that it must be packed in a zip file. After that, in the "install themes" tab, you need to click on "download".

To install, you need to select a file using the appropriate button. And click on the install button. After that, you will see a message about the successful installing wordpress template. And it remains only to activate it. Everything, our WordPress theme is installed.

And also, in this tab ("install themes") you can see the favorite, fresh and recently updated templates offered by wordpress.

Method 3: Installing a wordpress theme by uploading theme files to the hosting.

First, you need to find a theme on the Internet and download it. After that, if it is packed into an archive, it needs to be unpacked. And then there are two options: installation on local server and installation on the WordPress hosting engine.

1) Installation wordpress themes to local server: To install on the server, you need to copy the theme folder to the themes folder. You can find it in the following path: C/Webservers/home/localhost/www/your wp/wp-content/themes folder. Copy template folder to folder themes and restart local server. After that, go to the wordpress admin panel and in the "manage themes" tab, we find our template. And click "activate". The WordPress template is installed on the local server.

2) Installing a WordPress Theme on Hosting. This depends on the hosting you use and your preferences. On the hosting I use, you can upload the archive to the desired folder and unpack it there. And after that, just go to "theme management" and activate it. Everything is very simple. But the more common way is to use an FTP client like FileZilla. This is a free FTP client for uploading or downloading from FTP servers.

So, to upload a theme to hosting, you need to run the program and in the host, username, password and port fields enter your data provided for working with FTP, with . After filling in all the required fields, click on the "quick connection" button. In the right window, under the name "remote site" we are looking for a folder themes. It should be in the following path: Your domain.ru/public_html/wp-content/themes.

Open the folder and copy the folder with the theme here. I do it by just drag and drop. That is, I just drag the folder with the template to the themes folder in the right window of the FTP client.

After copying, you need to go to the "manage themes" tab and activate the theme.

Here are some tricky ways install theme on wordpress. I hope everything was clear and useful. Good luck in your endeavors.

Yes, and do not forget to constantly develop yourself. To speed up your development, I recommend you a video course: All the Technical Moments of Online Business in Video Format, from the well-known author of video courses - Evgeny Popov.