17

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 ...


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

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

$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 ...


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

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

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

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

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

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',...


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

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

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

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

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 ...


2

You are using Apache for your http server,it will keep it owns logs for access & errors, depending on how you have it configured. By default Apache will probably use the following logs; /var/log/httpd/access_log /var/log/httpd/error_log or /var/log/apache2/access_log /var/log/apache2/error_log Log locations are in your Apache Config (...


1

It is hard to track down the cause of a 500 error, so here's what I'd try: Be sure to also copy the new root folder files (except wp-config.php) - not just the wp-admin and wp-includes directories. Go the other way around. Make a backup copy of the current wp-content directory and your wp-config.php file. Do a complete fresh install of the WordPress files ...


1

Looks like PHP errors are switched off and you have a fatal PHP error. If they are being logged, you should check the logs as that would be your best bet to find out what's wrong. There you will find the error and what line the error belongs to.


1

Congrats on starting your first WordPress child theme. I'd recommend scraping what you have (because we don't know exactly what's wrong) and starting with the simplest child theme you can. Then add stuff until something breaks or you finish the child theme. To get started on a very basic child theme, create a new sub-directory in the themes/ directory. Add ...


1

Your style.css file is probably not breaking the site. As you suspect, CSS alone can't break a site, but if there are any problems with your theme as a whole, activating the theme may cause problems. It sounds like you copied the entire parent theme into a child theme. Is that correct? If so, what you really need to do is start the child theme from scratch. ...


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

The correct line number for this variable in the most recent WordPress version are 207 and 209. So I guess something has mangled your files. It is impossible to answer what exactly happened without seeing that code. Look for new user accounts, and re-upload all WordPress files from the source.


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.


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