14

Error pages are served up via .HTACCESS, if you are using Apache you would use the ErrorDocument directive and add the status and URL to it. So it would look like this in your .htaccess file: ErrorDocument 401 http://yourwebsite.com/error-401 ErrorDocument 403 http://yourwebsite.com/error-403 ErrorDocument 500 http://yourwebsite.com/error-500 You could ...


11

Sometimes I have a 500 error ( from NGinx ) just because I have a "character" getting outputted before the first header gets written ( or in-between ). Activate WP_DEBUG = true and see what happens. 99% of the case I could spot the error from there. ( and it was nearly all the time the above error ). Post back if that doesn't solve your debug difficulty ...


4

It's obvious that error is in custom-functions.php line 529 where you might be using file system function outside of admin, you can fix this by includin core admin file.php file like this. require_once(ABSPATH . 'wp-admin/includes/file.php');


3

Is $posts a reserved variable Yes, it is, $posts is the global variable which holds the array of posts from the main query. This is how it is set: $GLOBALS['posts'] = & $wp_query->posts; Just remember, $posts === $GLOBALS['posts']


3

For the sake of clarity, this should be your .htaccess RewriteEngine On RewriteBase /zingery/wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /zingery/wordpress/index.php [L]


3

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server. You have to enable the debug true to understand what is the problem. Open the wp-config.php file. To enable debugging mode, change define('WP_DEBUG', false); line to the define('WP_DEBUG', true); in wp-config.php file. Then you can ...


3

I don't understand your target. If you want to create a child theme, it is quite easy and strightforward; just follow these simple rules: https://codex.wordpress.org/Child_Themes Nothing to do with functions.php of the main theme which you should NEVER edit if you want to setup an independent child theme.


3

Assuming you're on Linux, if you go to your wp-content/plugins folder and run grep -R 'htaccess' * it should let you know if any plugins are addressing that file by name


3

Internal Server errors are usually thrown when there's an error somewhere in the code. You did the right thing searching the logs, but depending on your hosting configuration not all errors can be written there. I like using WordPress's own logging facility. Here's what you need to do: Stick the following lines in your wp-config.php file define('WP_DEBUG',...


3

As there are different modes that PHP can run in, it may be causing the internal server error (ie: FastCGI). You are better setting those values in your php.ini file or user.ini file to see if works that way. In your php.ini or user.ini file, do the following: max_input_vars = 5000


3

$sitepress is a global set by WPML, IIRC. Change your line 25 as follows: if(isset($sitepress) && is_object($sitepress)) { setlocale(LC_TIME, $sitepress->locale() . '.UTF-8'); } As a general rule you shouldn't assume in a theme that anything included in or set by a plugin will be available, because it's possible to disable the plugin while the ...


2

I received a 500 Error message after update the wordpress. However, the problem was not caused by the update process. Your database server may corrupt a table(s). To fix this problem you should use phpMyAdmin or something else, and optimize/repair the tables. It Works For Me!


2

In phpmyadmin search : SELECT * FROM wp_options WHERE option_name = 'template' OR option_name = 'stylesheet' OR option_name = 'current_theme'; then : UPDATE wp_options SET option_value = 'yourthemename' WHERE option_name = 'template'; UPDATE wp_options SET option_value = 'yourthemename' WHERE option_name = 'stylesheet'; UPDATE wp_options SET option_value =...


2

I had the same issues, after some time of not touching the site it suddenly started producing "500 Internal Server Error" on various pages. After a week of pulling my hair it turned out that my "/wp-content/debug.log" (which I enabled a long time ago and then forgot about) was over 128 MB, and therefor could not be written to for some reasons, hence all ...


2

Sorted it out myself. The problem was, server was very slow to process the import. The process was happening behind the scene but server actually went down. When server was up, I could see all the content on the other site.


2

Raising apc.shm_size from default value 32M to 256M in php.ini seems to do the trick for us. edit: raising that value is not a bad idea, however it does not solve the issue in the long term. We are now considering removing either APC or Super Cache...


2

Given these errors are all being generated by WP core, there might be a corrupt install (a file/files only partially copied) Download the matching WP install and manually upload the files above throwing errors over the top


2

Connect to you Cpanel through godaddy and search for PHPMyadmin. The interface that allow you to manage your database. Then search for a table called wp_options then in this table you should be able to find the url of the site in two places (siteurl,home) and you should be able to change it back to the domain name. After this you will be able to access the ...


2

The simplest way to disable a plugin when there is no access to admin, is renaming of plugin folder. Connect via ftp by Filezilla, for example. Find plugin folder and put dot before its folder name. This should look like wp-content/plugins/.bbpress/ Such folder names are ignored by WordPress. Update the admin page and you will see that bbpress is removed ...


2

If you want to check one Plugin's Function / Class etc. from another Plugin, then it's best to use a hook like plugins_loaded. Based on this, your Plugin CODE will look like: <?php /* Plugin Name: YOUR PLUGIN NAME */ defined( 'ABSPATH' ) or exit; add_action( 'plugins_loaded', 'plugin_prefix_woocommerce_check' ); function ...


2

Adding this code to the top of the index.php file in your theme will return a 403 if the theme directory is accessed directly: if ( ! defined( 'ABSPATH' ) ) { header( 'HTTP/1.0 403 Forbidden' ); die(); } However, you never see that code in any theme's index.php file, because it's unnecessary. I only include it so that this answer has an actual ...


1

Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your admin panel, try deactivating all plugins. If you don’t have access to your admin panel, try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the ...


1

htaccess was my first thought. Since you've checked that, I'd move on to the apache error log. If you can't access this yourself your host should be able to help you.


1

Does wordpress have any built-in settings for doing this? Most likely your host will have an option on your cPanel for custom Error pages. Something along the lines of: If that is not the case, please have a look at this older question: How to create custom 401, 403 and 500 error pages? EDIT 1: Also at this one: https://stackoverflow.com/questions/...


1

Disabling garbage collection only means that what ever memory is being leaked will reamain leaked and there will be no effort to reclaim it. To fix 500 problems you need to check the actual errors reported at the php error log.


1

I had the same issue and did not find any information in my debug output. It worked out, that DOING_AJAX was not defined (I don't know why). Changing the beginning of async-upload.php from if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { define( 'DOING_AJAX', true ); } to define( 'DOING_AJAX', true ); ...


1

This likely isn't exactly an issue caused by WordPress, but due to server configurations and/or settings. 500 errors are pretty generic and can have a variety of origins, so it is hard to give the one directive that will solve it. By the way, the returning of JSON and HTML seems to be common when this happens, not sure where and it gets mixed up, might be ...


1

My problem had to do with file permissions. Even though it looked like the permissions were correct, the index.php in the root had the permission set to 644, instead of 664. Once I changed the permission the front-end loaded. It's a bit odd that of all files in the root, the index is the only one with the wrong permission.


1

When I had developed a theme, and I was trying to automate the import process by tweaking wordpress-importer plugin. I had faced the same issue. When importing server processes numerous DB operations at same time, that's why it's not able to respond and it results in 500 Internal server error. Try 1 : To fix the issue, you have to import one by one. ...


1

500 errors can be for many reasons. In context of submitting form they are more common because of security setup, typically mod_security. It tends to have strict rules for form submissions / POST requests. There isn't much you can do about it really. At one host in the past I needed to ask support to disable some mod_security rules, because I couldn't even ...


Only top voted, non community-wiki answers of a minimum length are eligible