admin管理员组文章数量:1391977
It's been approximately a month since i can no longer update any plugins or wordpress core on my website. When I attempt to update the website it get's knocked off line. Jetpack then reactivates the website for me after 5-8 minutes. When it comes back online I get this in the admin section:
There has been a critical error on your website. Please check your site admin email inbox for instructions.
Unfortunately, i don't actually get that email. Thus no further information.
Despite these problems, I can continue to publish articles, and the rest of the website works as expected.
I've been reading up on what could possibly be the problem, and think it could have something to do with my webhosts settings (DigitalOcean) and directory permissions.
What do I need to look at to determine if directory permissions is the problem? Or what the problem could possible be, to have the website behave like this?
UPDATE:
I have looked at the error.log
and I see the following lines repeated:
[Tue Jan 21 09:15:26.128769 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function get_header() in /var/www/clients/client1/web1/web/wp-content/themes/study-circle/index.php:13
[Tue Jan 21 09:15:26.128824 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: Stack trace:
[Tue Jan 21 09:15:26.128832 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: #0 {main}
[Tue Jan 21 09:15:26.128837 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: thrown in /var/www/clients/client1/web1/web/wp-content/themes/study-circle/index.php on line 13
The index.php code looks normal to me...
<?php
/**
* The template for displaying home page.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Study Circle
*/
get_header();
?>
<div class="container">
<div class="page_content">
<section class="site-main">
<div class="blog-post">
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content' );
endwhile;
// Previous/next post navigation.
the_posts_pagination();
else :
// If no content, include the "No posts found" template.
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- blog-post -->
</section>
<?php get_sidebar();?>
<div class="clear"></div>
</div><!-- site-aligner -->
</div><!-- content -->
<?php get_footer(); ?>
And the get_header
Function from wp-includes/general-template.php:
function get_header( $name = null ) {
/**
* Fires before the header template file is loaded.
*
* @since 2.1.0
* @since 2.8.0 $name parameter added.
*
* @param string|null $name Name of the specific header file to use. null for the default header.
*/
do_action( 'get_header', $name );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
}
$templates[] = 'header.php';
locate_template( $templates, true );
}
It's been approximately a month since i can no longer update any plugins or wordpress core on my website. When I attempt to update the website it get's knocked off line. Jetpack then reactivates the website for me after 5-8 minutes. When it comes back online I get this in the admin section:
There has been a critical error on your website. Please check your site admin email inbox for instructions.
Unfortunately, i don't actually get that email. Thus no further information.
Despite these problems, I can continue to publish articles, and the rest of the website works as expected.
I've been reading up on what could possibly be the problem, and think it could have something to do with my webhosts settings (DigitalOcean) and directory permissions.
What do I need to look at to determine if directory permissions is the problem? Or what the problem could possible be, to have the website behave like this?
UPDATE:
I have looked at the error.log
and I see the following lines repeated:
[Tue Jan 21 09:15:26.128769 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function get_header() in /var/www/clients/client1/web1/web/wp-content/themes/study-circle/index.php:13
[Tue Jan 21 09:15:26.128824 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: Stack trace:
[Tue Jan 21 09:15:26.128832 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: #0 {main}
[Tue Jan 21 09:15:26.128837 2020] [fcgid:warn] [pid 16817] [client 52.9.128.29:42158] mod_fcgid: stderr: thrown in /var/www/clients/client1/web1/web/wp-content/themes/study-circle/index.php on line 13
The index.php code looks normal to me...
<?php
/**
* The template for displaying home page.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Study Circle
*/
get_header();
?>
<div class="container">
<div class="page_content">
<section class="site-main">
<div class="blog-post">
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content' );
endwhile;
// Previous/next post navigation.
the_posts_pagination();
else :
// If no content, include the "No posts found" template.
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- blog-post -->
</section>
<?php get_sidebar();?>
<div class="clear"></div>
</div><!-- site-aligner -->
</div><!-- content -->
<?php get_footer(); ?>
And the get_header
Function from wp-includes/general-template.php:
function get_header( $name = null ) {
/**
* Fires before the header template file is loaded.
*
* @since 2.1.0
* @since 2.8.0 $name parameter added.
*
* @param string|null $name Name of the specific header file to use. null for the default header.
*/
do_action( 'get_header', $name );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
}
$templates[] = 'header.php';
locate_template( $templates, true );
}
Share
Improve this question
edited Jan 21, 2020 at 10:05
rohrl77
asked Jan 20, 2020 at 21:38
rohrl77rohrl77
1014 bronze badges
2
- That looks OK. get_header is defined in wp-includes/general-template.php. It might be worth replacing all of the core WordPress files with a new uploaded copy if you can do that easily / safely. – Rup Commented Jan 21, 2020 at 9:10
- I don't know enough about PHP to say for certain, but the get_header functino also looks ok to me. How would I go about replacing all of the core wordpress files? Download the current files using FTP as a backup and then upload a new copy manually also using FTP? Makes me a bit nervous. – rohrl77 Commented Jan 21, 2020 at 10:09
2 Answers
Reset to default 1Besides looking at your inbox for any messages that WP might send you (they don't always get sent), look at the error.log file in the site root and wp-admin folders. That will tell you where the error is.
If it is a plugin, then rename that plugin's folder temporarily, then try the update again. You could also rename the entire plugin folder to temporarily disable all plugins. And you might consider reverting to one of the 'twenty' themes to do your update.
Once you have updated WP (and updated your PHP version, which may also be the problem; contact your hosting place for instructions on that), you can move back to your old theme. Then make a new plugins folder, and move each plugin folder individually to the new plugins folder. After each move, check the admin page, and do the 'update' check. Repeat for each plugin. (And update your theme, if needed.)
Your issue shows the importance of keeping WP - core, themes, and plugins - updated. Less problems that way. (And the importance of updating your PHP version.)
In the end I could not solve this myself. I hired a freelancer who specialised in WP development. As it turned out, it was a plugin (OptimizePress 2) that was responsible for this problem, however, the issue remained even when that plugin was deactived. How this is possible, I don't know, and can't give any real technical details on.
Just wanted to report back.
本文标签: permissionsWordpress won39t allow for updates to plugins or Wordpress Core
版权声明:本文标题:permissions - Wordpress won't allow for updates to plugins or Wordpress Core 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744751281a2623194.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论