Wordpress update failing with Internal Server Error - wordpress

Version -
WordPress 4.7.12 running Twenty Seventeen theme with Plesk Onyx has Web Windows Hosting Application
Error
When I login into Dashboard and select "Update" option for upgrading WordPress installation to 5.1, it loads for some time and then shows an error message:
The page cannot be displayed because an internal server error has
occurred.
There's no other text except for this.
Wha I've tried so far
I attempted to enable logging by adding the following three attributes into the wp-config file, but no debug file gets generated into the wp-content folder. I checked IIS logs, but couldn't see logs file updating.
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
Deactivated all plugins - Problem persists
Please suggest options to fix this or get more details.

I think that that's what error logs are for.
Try to create .user.ini or php.ini files in the same directory contains
error_log = phperrors.log
(absolute path is preferred)
And, then run your script again and then check for the same file.
Thanks

Related

Wordpress Upgrade failed. Admin panel not working

I wanted to Upgrade the Wordpress installation, I clicked on the Upgrade to latest version link from my WP ADMIN panel and post that it has asked me to give FTP details for the Update for which FTP details were entered and Upgrade started. After few minutes I got Below ERROR and Now WP ADMIN is not loading. I tried to clear browser cache and cookies but still not working. Please Help in resolving the issue.
There has been a critical error on your website. Please check your site admin email inbox for instructions.
Learn more about debugging in WordPress.
I have further tried to debug and added below code in wp-config but i am not getting any errors on the page neither in the path /wp-content/debug.log file
is there.
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
Reference : https://wordpress.org/support/topic/wordpress-upgrade-failed-wp-admin-panel-not-working/
Dear users, please use manual update if you can’t update automatically.
See here:
Updating WordPress
You can do it with cpanel:
Simple copy wp-content & wp-config.php to a directory out of public_html (for example, create a folder by name “backupold” and put files in it)
Download latest version
https://wordpress.org/latest.tar.gz
Upload it in your wordpress directory (output file will be in public_html/wordpress for example)
Copy (backuped contents) “wp-content” folder & “wp-config.php” file to “wordpress” folder & replace
Move all files and folders from “wordpress” folder to your site directory (by default, public_html) & replace.
Now enjoy!
Warning: do a backup before, and do as i sayenter code here

Wordpress RPM not showing plugins update

We have a Wordpress multisite 4.2.2 RPM installation on CentOS 6.6 and in the network plugins panel, the add plugin button and the plugins updates are not showing up (100% sure some plugins are not up to date).
The odd thing is when heading to /wp-admin/network/plugin-install.php, it says we haven't sufficient permissions to access the page. Note that we have a superadmin account.
So far, we tried to comment the config line define( 'DISALLOW_FILE_MODS', true ); and changing all the salt in the config ... no luck.
We tested our server connection to api.wordpress.org:443 and planet.wordpress.org:443 without any problem.
Also note that we have a second WP installation on the same server (not multisite) which is working as intended.
Any clue is welcome, thanks !
We find out it was a problem with the config.
We needed to keep define('AUTOMATIC_UPDATER_DISABLED', true); and we commented define( 'DISALLOW_FILE_MODS', true );.
But DISALLOW_FILE_MODS need to be set as false, not just commented otherwise default value is true i guess.

Wordpress upload theme

I was trying to install wordpres on my local computer. However, when I try to upload a theme or install some plugin using the web interface. It always prompts me to enter FTP credentials. I checked online, and it seems that ftp credentials is not necessary for uploading. I set the permissions for all directorieos and files under wp-content to be 777, but the problem is still there. And this Word press is a fresh installation on ubuntu 14.04( running in a VM) and newest wordpress.
Hi I got this issue before some time wordpress ask ftp detail when I was trying to install new plugin and get resolved by adding this code in my wp-config file.
define( 'FS_METHOD', 'direct');
Add this code to wp-config.php :
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );

Cannot Install Wordpress Plugin (Download failed)

i am using WordPress 3.6.1 and I have strange problem today. First I have to tell that my current website was copied from old website, both the WP files and database.
So in the current website, I try to install new plugin, but it returns error:
Downloading install package from http://downloads.wordpress.org/plugin/xml-sitemap-xml-sitemapcouk.zip…
Download failed. Could not open handle for fopen() to /home/k5841724/public_html/wp-content/uploads/xml-sitemap-xml-sitemapcouk.tmp
Then all my plugins are dissapered (Akismet, Hello Dolly, etc), and I can't install any plugin. Nothing wrong with my permission, /wp-content, /wp-includes, /wpcontent/uploads all are set to 755. Any idea what is the solution for this issue? Thanks.
addition note:
all my plugins folder (Akismet, etc) still there inside wp-content/plugins folder, but not appear in WP Dashboard.
You should check permissions for folder wp-content/uploads
I think wordpress can't write to this folder. Set for this folder permission 777 and try again.
I have experienced the same error with plugin installation.
In my case it was very informative to change WP_DEBUG to true in my wp-config.php file.
After doing so I have noticed the error message, telling me that open function is disabled due to security reasons.
Try changing your php.ini settings so that disable_functions doesn't contain fopen

Getting a 500 internal server error for wordpress?

I already tried doing the php.ini memory=20MB solution but it did not work. I uploaded it under the wp-admin/ folder.
I'm not really sure what else to try. Help?
The memory bump doesn't go into an .htaccess file in wp-admin. It goes into the .htaccess in web root. Use FTP to find and delete the .htaccess file you put in wp-admin.
Then forget about .htaccess files and try adding the line below near the top of your wp-config.php file, a few lines after the opening <?php
define('WP_MEMORY_LIMIT', '64M');
Renaming plugin directory temporary solved the problem for me
This problem occurs because your php dont't have any xml or has a deprecated version xml, so if you manually instal or update your xml, the problem will be solve.
If you using Ubuntu, try execute this code in your terminal:
sudo apt-get install php-xml
After this you need to restart apache so it takes effect, for this execute the command:
sudo service apache2 restart
Go to setting -> permalink and then select any common setting after that save it.
Reload the website. Everything will be fine.
Then reset it to previous common setting so that it will not effect for URL.
A 500 error is an Internal Server Error, which sometimes can be a hosting configuration problem, but in WordPress it is often a fatal PHP error.
First, just remove that php.ini file - some web hosts do not allow you to modify the PHP settings, so let's take that out of the mix first.
If it is a server error, temporarily rename your .htaccess file to something else (to take it out of the mix as well). Also, check for an error_log file in your filesystem, or the Error Logs in your hosting control panel.
If that doesn't tell you anything, it is likely a PHP issue. Turn on WordPress Debugging by adding the following code to your wp-config.php file:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
#ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
Make sure you comment out the line that says:
define( 'WP_DEBUG', true );
Now, when you refresh the page and get the error, WordPress will write any PHP errors to wp-content/debug.log. Check that log for a fatal PHP error - it will tell you which file is causing the error, often a theme or plugin file.
Once you know the cause, rename that theme or plugin to temporarily remove it from WordPress. That should restore normal functionality.
Another important fix for the internal server error is to try and upload a fresh version of wp-admin and wp-includes to your site.
This step should be a last resort, but if you’ve used the above solutions and still cannot find one that works, it’s worth a try. Backup your site, and download a fresh version of WordPress from the main site.
Extract the files from the ZIP file, and open the extracted folder. Open your site’s root directory in an FTP client, and upload the wp-admin and wp-includes from your fresh version of WordPress to your site’s directory, overwriting the older versions.
Refresh the client, and refresh your site. If the error is gone, it was likely caused by a corrupted core file. If you still see the error, you may have no other option than to contact your host. Check it out for more WordPress internal server error fixes.

Resources