Wordpress White screen of death after migration - php

So after i moved my website from a local WAMP installation to a hosting provider, I am getting a white screen of death. The website is working normally, except that i cannot access wp-admin. I have tried disabling the theme and the plugins(it's now on twentyfifteen) but the error still persists. Before i disabled those, debug would show something like 'WP:Widget is deprecated, please use __construct()' so i searched online and i figured it should be one of the plugins or the theme, but that doesn't do the trick either. Now, debug shows nothing and the white screen persists. Maybe it's related to the php version of the new hosting? I have tried reaching out to them, but until they answer maybe someobody here knows what I should do. Thanks in advance for any help.

Case 1 : You can Access Admin
Remove htaccess from root
Login into admin update paramlinks
deactive and active theme you are using.
Case 2 : You can't Access Admin (Try With FTP)
Disable Plugins
your plugins by simply renaming the plugins directory to plugins.old
Disable Theme
if you rename your active theme the same way we renamed plugins, WordPress will automatically fall back to using a default WordPress theme.
Enable Debugger
WP_DEBUG, it’s a constant that you can add to your wp-config.php file on your website, that will output any specific errors that are occurring on the site the same way the Windows blue screen does.
That's it.

In my case the error was because file permissions. In localhost all the files was owned by www-data:www-data but in production the right user is root so I just need to change all files to root with:
sudo chown root:root -R /var/www
And that fixes everything

Related

Wordpress 404 after manual install

My core wordpress files got hacked because of a plug in. My site started giving malicious redirects.
While trying to edit wp-config.php, my site went fully offline. I tried a full manual reinstall because of this and I needed new core files anyway. My site is still not online. I have the database, database password, and username in wp-config.php. Also, I have everything in the document root for the correct domain. Maybe there is some conflict between the two domains with my host?
Does anybody know what might be causing this 404. I can't get access to the dashboard.
I got a backup before doing anything and I downloaded wp-content. The original database is still available.
I tried an automated install through cpanel with fresh everything and this would not get me to a dashboard.
Well, 404 error is not because you can't connect to your database. You should see Database connection error message if database is the problem. Did you edit .htaccess file maybe? You can try to remove everything there and put default one for Wordpress.
May be your site compromised. Deactivate the plugins using the file manager provided by your host and rename wp-content/plugins to wp-content/plugins-old, also deactivate the theme or rename the wp-admin folder on root directory and then take a try to login. Also turn on the debugger.

Wordpress on Plesk (Ubuntu) - suddenly white screen with no html returned

I can't explain it, I didn't change anything but it seems suddenly today one of my websites on my Plesk environment (Plesk on Ubuntu) is suddenly white. No error, no php errors, nothing (even with define( 'WP_DEBUG', true ); or any other method that would help me find something.
Also the error logs for the domain don't seem to return anything helpful.
As it's Wordpress I tried to rename the plugin folder, theme folder, checked .htaccess, other configs.
But … 
I only get a completely empty page when I inspect it.
<html>
<head></head>
<body></body>
</html>
I'm running PHP 7.2.19 with "FPM application served by nginx" but also switching to some other PHP version, updating parameters or switching to apache-serving doesn't do anything.
I also checked other domains on the same Plesk installation, that work all fine.
Any ideas here?
Before you give these solutions a shot I recommend that you restart your server first as the problem might get solved by itself because we know that plesk does a lot of updating in the background.
Solution 1
Access your error logs /var/www/vhosts/yoursite.com/logs/access_log and check if there are 500 errors in there. Meaning that you need to allocate more Memory in the PHP settings of plesk (Plesk > Your Website > PHP Settings) e.g 256 or 512 MB.
Don't forget to add define('WP_MEMORY_LIMIT', '256M'); in your wp-config.php
Solution 2
Rename /plugins/ folder to /plugins.old/ and create a new empty plugins folder then go to /wp-content/ and remove advanced-cache.php. Also in wp-config.php check if you have define('WP_CACHE', true); then change it to false.
Solution 3
Your theme could be broken so switch to any default theme to find out.
Solution 4
Go to Plesk > Your Website > PHP Settings and enable errors. Then add "define( 'WP_DEBUG', true );" into your wp-config.php. Try to Visit your administration panel and view random webpages to see the errors as they could give you a clue of what is going on. Then you can google whatever error.
Solution 4
Go to Plesk > Your Website > Settings > Switch To FastCGI/PHPFPM, Apache/Nginx, etc. Try all of those in combination with different PHP versions.
Solution 5
Turn off Mod Security from Tools & Settings > Web Application Firewall (ModSecurity)

FTP Credentials requested when trying to activate WordPress Theme

Running an instance of Bitnami Wordpress on AWS Lightsail. Getting the following screen when trying to activate a Wordpress theme (JobCareer):
UPDATE #1 Turned on debug and saw the error information in the above screenshot.
Other themes and plugins I have tested all installed and activate without issue, so it's probably something specific to this theme.
I have made sure that define('FS_METHOD','direct'); is set inside wp-config.php file.
The wp-content folder and sub-folders/files are all chown to bitnami user and have the appropriate permissions (folder:755 & files:644).
At a loss as to what else to try. Thanks for any help you can provide! :)
It's definitely a files & directories permission issue. Move the define('FS_METHOD','direct'); line back to where it was (that change is causing a different error).
The 'www-data' user is the default user for Apache (and other HTTP servers?), in case you didn't know.

I can log in to the wordpress admin but when I go to the site pages, why does 'localhost redirected you too many times' come up?

My client's live wordpress website went down when the host forced an upgrade to PHP 7. I downloaded his site and db locally and tried to merge it with a newer Wordpress version that can handle PHP 7 but I can only access the admin area.
I keep on getting the 'localhost redirected you too many times' message.
I've tried deactivating plugins, adding this code
define('WP_HOME', 'http://localhost:80');
define('WP_SITEURL', 'http://localhost:80');
I looked at my access.log and it says 301 20
how can I stop it from redirecting?
I was just working on this myself today. The Home and Site URL should be locating the area that all of the wordpress files are in.
For example:
define('WP_HOME', 'http://example.com/pathToWordPress');
define('WP_SITEURL', 'http://example.com/pathToWordPress');
You also need to give the www user access to read those files. Depending on which operating system you're using its different for each one.
I was using Ubuntu earlier today and I had to give them access to read by entering this in my command line:
chmod 755 www-data:www-data /var/www/example.com/public_html/wp-content
Hope this helps!
Try to remove .htaccess file in your website directory, then just go to Settings - Permalinks and click Save Changes button.

magento homepage gives a blank screen

I was working on my magento page www.samsungtelefoonhoesjes.com and suddenly my homepage that normally works perfectly only shows everything until the home slider. after that everything is white....
The page worked 30 mins ago.
What is the best way to troubleshoot this?
Can I use firebug or something for this where should I start?
cleared cache
reindexed
removed cache
disabled the slider (this was my last change i did)
Firebug shows 500 Internal Server Error.
Try following solutions:
Check apache error_log, it should be in /var/log/apache2/error.log in most cases.
Check for permissions to your files and folders. Files should be 644 and folders should be 755. Reset permissions using magento cleanup script.
Check your .htaccess file.
Check out this article. http://techjam.gr/2012/magento/solve-magento-500-internal-server-errors/
Try restarting apache on the server, this worked for me.

Categories