WordPress - wp-admin blank page - php

I am currently unable to get into my WP Dashboard. The wp-admin page is completely blank throwing no visible errors. I can hit wp-login.php, use my login credentials and hit Log In and then again just blank page, still not logged in. The site it self works fine.
I did enable wp_debug and this still is not showing any errors.
I just took over this site so I do not know of any recent updates or changes made to themes,plugins etc.
UPDATE: I was able to get wp-admin page to load the wp-login page properly by just uploading a clean version of wp-admin/index.php. However I am still seeing a blank page and unable to login after hitting 'log in'
I check the error logs for the server and I do not see anything related to this site.

Make sure that u don't have blank spaces in config and functions file at the top or bottom of theses.
btw, it seems like server's error. See his log :)

Sounds like a PHP error.
Add:
error_reporting(E_ALL);
ini_set('display_errors', '1');
To the top of wp-admin/index.php

A common troubleshooting technique would be to rename your
./wp-content/plugins
folder. This will temporarily deactivate all your plugins. Often such issues are caused by a malfunctioning plugin, usually after an automated update.
Another thing you can try is to switch the php version of your hosting account. Most hosting companies run CloudLinux and you have in cPanel -> Select PHP Version. You can test the administrator login with different versions.
You can also contact your webhosting provider and have them check if the ConfigServer eXploit Scanner (cxs), often installed on shared servers hasn't quarantined any of your website files.
It might be a long shot, but it is also worth checking your .htaccess file.
Good luck!

It may be caused from an error in your theme functions file. If you have a theme backup (which you are sure worked before), try restoring it from the file manager in your host panel. If you don't, try uploading a popular wordpress theme (e.g. twenty-sixteen) then change your default theme from PhpMyAdmin.

Go to your root folder, open wp-config.php,...
Enable Debug mode.(i.e)
define('WP_DEBUG', false);
to
define('WP_DEBUG', true);
And inspect it using Firebug.

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.

Magento blank admin pages

Some background information:
We developped a website in magento and it runs just fine on our server. Now we need to transfer the website, but as soon as we copied the database and all files to the new server we had some problems. The website seems to run just fine but when we login with the same login information as before all of the admin pages are blank. we can see the admin bar on top but not the content.
This site isn't live on the new server since we just changed the .hosts file in order to see the site.
I tried a lot things all around the internet but none of that seems to work.
What could couse this problem and how can we fix this?
I just found a solution.
i added these lines to my index.php file in order to see logs of the problem.
error_reporting(E_ALL);
ini_set('display_errors', 1);
Then i saw some error loggings on the admin page telling me there was a problem with CURL.
So i want to my php.ini file and i saw that CURL wasn't enabled there. So enabeling this did the trick.

ERROR: The file 'wp-config.php' already exists

I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this error:
"The file 'wp-config.php' already exists. If you need to reset any of the
configuration items in this file, please delete it first. You may try installing now."
When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.
I have tried to change the name of the wp-config.php file but that didn't do anything.
Is just a browser cache.
On first URL load, you are redirected from domain.ext to domain.ext/wp-admin/setup-config.php
If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".
Now refresh again and you will see your website
I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:
Click on General => Permalinks
Click Save Changes (to reset permalinks)
Try to display the website first on the incognito tab. If it works correctly, clear the browser cache.
Once the page refresh has been completed, the website will appear.
You can use the following shortcuts to clear the browser cache.
Windows: Ctrl + F5
Mac OS: CMD + Shift + R
This usually happens when you use an old version of Wordpress files or old database, and you use partly new files of Wordpress.
All you need to do is to delete all WP files and install a fresh Wordpress (new files unzipped from a new version of Wordpress) and use an empty database.
If you're planning to migrate or move from another website, you should use the export/import function built in wordpress.
he file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
Answer:- Please Clear Your browser's cache.
Did I miss the party?
Today I have a problem like what you experienced 5 years ago. The solution is: Remove all caching plugins (Cloudflare, Jetpack, Litespeed).
Maybe you could try to delete 'wp-config.php' file, or take a backup of this file in different folder and then try again.
If you are using bluehost and did not do the one click install :
I solved this problem by deleting the default error pages 404.php 500.php etc...
I do not know why exactly this was causing this issue... Sorry for the sloppy answer but tried clearing cache and recreating the .htaccess file it didn't work.
I removed the added spaces that the Wordpress's own web 'easy installer' created in the wp-config.php file to help me out.
Guess the Wordpress's own wp-config.php ?checker? isn't compatible with Wordpress's own installer. Wow.
Once the added spaces were removed, site comes up fine. I simply modeled the spacing that is in the wp-config-sample.php file.
Because you just installed wp.
Just hit ctrl+F5 done!!!
More likely it is cache issue and this error comes when we try to install one Wordpress inside of another sub folder of the cpanel in the same Wordpress installation and it will be mostly resolved when you try to check it in the private window or another browser
For me it was file permission set to 666 changing it to 664 worked.
If someone is still for a solution.
This happened to me on an existing site while trying to update.
the problem was following line in wp-config.php near the end.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-admin/setup-config.php');
Removing this fixed the problem.
Hope this helps.
RESOLVED: I had the same problem. post hack situation on other account, shared hosting and server NUKED. Luckily I had the backup files from one of the WP plugins but the main page didnt load, I could only go to 404 and from there to other pages but not main page, the error was wp-config eists...install...blah blah blah.....so I tried everything, multiple re-installs, changed the wp_prefix as per previous install on the fresh install and nothing helped, even ordered paid support from the backup plugin developer as I was sure that it fooked because I had Opencart also installed there but the backup was intended for WP only, my web developer also did something, perhaps removed the OC bits from DB, but thank god i managed to resolve it on my own(and justhost),. so I contacted the justhost for the SECOND TIME and they told me that the account is on VARNISH i.e. some sort of automated cache limit, so I told them to take it off and they wanted to know what have I done to reduce the LOAD to the server, so I told this and that and two seconds later everything loaded perfectly. took me about 20 hours to get main page loading, plus probably it will take 10 hours for fine tuning of the site. anyway if you contact jour host make sure you ask them if they are not blocking cahce as the first time I got in contact they couldnt help me.
I also meet with same error and Mr Pierre R is right its just a cache. Just clear your cache or check in private window. All fine.
if someone have still this error..
goto->admin->setup.php (delete this file error will be solve)
hope this will help.

WP migration, can't login to WP admin

I was in the middle of migrating a local WP site to a live server and came across a problem.
I edited my WP config file and uploaded it along with the rest of the WP files. I also uploaded the mysql database through phpMyAdmin.
Once i tried to test the site i got an error message "The page isn't redirecting properly". I then, mistakenly, logged in to the admin area and in the Settings > General tab I deleted the localhost part of the URL. Now I'm unable to log back in to the WP admin area.
EDIT
To clarify, my major problem is that i can no longer log in to the wp admin area because of something I've done. The steps i took to get to this point were:
Backed up WP using the BackUpWordpress plugin
Edited back up wp-config file with define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
Created mySQL database through DreamHost
Changed database info in wp-config file
Uploaded wp files (not including mySQL backup) to my url using Filezilla
Imported mySQL database backup to DreamHost
I then checked the site from my browser, an error message said too many redirects occurred
From the wp admin area i went to Settings > General and deleted the localhost part of the url that was displayed.
I believe it's due to the previous step I'm now unable to access the wp admin area at all.
I need a way of getting back into the admin area
You can also edit those options within phpMyAdmin. Go to wp_options and locate siteurl and home. Make sure the URL matches your site URL.
You can also edit the site URL in your wp-config.php.
Add these lines somewhere above the /* That's all, stop editing! Happy blogging. */ line.
define('WP_HOME','http://my-site.com');
define('WP_SITEURL','http://my-site.com');
This should overwrite your database settings.
I believe the problem is that studiomed.co.uk is permanently redirected (301) to www.studiomed.co.uk and www.studiomed.co.uk is permanently redirected (301) to studiomed.co.uk
Login to your Dreamhost account go to Domains->Manage Domains and choose one of the three options there are in "Do you want the www in your URL?".
After that use an ftp program to download the .htaccess file that exists in your root installation of wordpress and open it with your favorite editor. Check if you have any kind of redirection in the .htaccess file.
Which version of WordPress do you use?
Can you list the plugins you are using?
Have you gone through the basic WordPress troubleshooting steps?
flush any caching plugins you might be running, as well as server
and/or browser caches.
deactivate all plugins to see if this resolves the problem. If this
works, re-activate the plugins one by one until you find the
problematic plugin(s). Sometimes, an apparently inactive plugin can
still cause problems.
If you can't get into your admin dashboard,
try resetting the plugins folder by FTP or PhpMyAdmin (read
http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F
if you need help).
switch to the Twenty Eleven theme (depends on your WordPress version) to rule out any theme-specific problems.
If you can't log in to change themes, you can remove the theme folders via FTP so the only one is twentyeleven. That will force your site to use it.
manual upgrade. When all else fails, download a fresh copy of the latest.zip file to your computer, and use that to copy up. You may need to delete the wp-admin and wp-includes folders on your server. Read the Manual Update directions first: http://codex.wordpress.org/Updating_WordPress#Manual_Update
check the Master List to see if you're experiencing a known issue
Login to your wordpress dashboard (wp-admin) and go to Settings->Permalinks, select Default and save changes.
Update all urls(path) using this querys then check:--
Use this querys for change all urls(path) for db then check
UPDATE wp_options SET option_value = replace(option_value, 'http://live_ste_path.com', 'http://localhost/local_site_path') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://live_ste_path.com', 'http://localhost/local_site_path');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://live_ste_path.com','http://localhost/local_site_path')`
[WSOD RESOLVED]
Since I could not find any solution to my problem by googling around, a crucial tracking info I finally found in WP error logs. So I would recommend to inspect logs before spending to much time looking for a proper answer by google.
After migration from an old web host to a new one, in my multisite environment all sites were working. Also, I was able to administer all subsites - but one! Trying wp-admin login to that site led me to fatal white screen. Without any message or any indication about the reason. And the culprit was corrupted file /public_html/subsite-x/wp-admin/admin.php. I really could not understand how that happened, just might suppose it appeared somehow while transferring files (FTP) from old host to a new one.

After migration of WordPress website I can't access the admin (white page)

I am trying to move a WordPress site from my local server to the online server.
The problem is that, after the migration, if I try to open the administration page (wp-admin) I only obtain a white page, as you can see here: http://scorejava.com/wordpress/wp-admin/. Everything else seems work well in the homepage: http://scorejava.com/wordpress/.
In my local web server I have the WP site into the folder: /var/www/wordpress. I have moved it into a wordpress folder that is into my root directory of my online web server.
I have also import the local database into the onlyne database using MySql and then I have use the Search and Replace for WordPress Databases Script to change automatically all the http://localhost/wordpress occurrence into the database tables with http://scorejava.com/wordpress/.
There is an error on your site, and you need to find out what's happening.
WordPress URLs
When migrating WordPress sites where the URL changes, you will need to tell WordPress about the new URL. WordPress stores that information in the database, so if you're comfortable with that, you could find the correct entry in the wp_options table in your database and update its value.
I will show some fixes for standard WordPress installs (where the site URL is the WordPress root), but you may need to use different values for home and siteurl if you have a different setup.
Fix URLs via SQL
You will need to update the relevant fields in the DB, those being the entries of wp_options where the option_name is siteurl or home. You can find these fields using phpmyadmin, mysql-workbench, or another database management tool, or you can use the following query, changing the URL to be your own.
UPDATE `wp_options` SET `option_value`='http://www.myurl.com' WHERE `option_name` IN ('siteurl', 'home');
Fix URLs via wp-config.php
However, you can also do this via wp-config.php, which I find to be much more comfortable. Just open wp-config.php and add the lines:
// Site URLS (override DB settings)
define('WP_HOME','http://www.myurl.com'); //<-- NO TRAILING /
define('WP_SITEURL','http://www.myurl.com'); //<-- NO TRAILING /
Obviously you'll need to supply your correct URL.
It's possible that this is the only error you're having, and after adding those lines to wp-config.php, you will be able to log in and use your site normally.
Debugging WordPress errors
However, if you continue to experience problems, and any time you're working on developing a website, you will want to see error output. You can check your server logs for information about the errors, but you may find it more convenient for WordPress to simply display the errors in the page. To enable error display, change the following setting to true in wp-config.php.
define('WP_DEBUG', true);
Now WordPress will display any errors it encounters directly in the webpage. Be sure to change the setting to false for use on a production site.
Working with wp-config.php
This file will be located in the root directory of your wordpress installation. To make any of the changes mentioned here, you may either edit the file directly on the server (via ssh for example), or download the file with an FTP client, make your changes using a text editor, and upload the file again.
It's also a good idea to keep a backup copy before making any changes in case you break something while you're working.
References
You can read all about changing the WordPress site URL on the docs page.
Late To the party, I've experienced this recently and I managed to solve the issue. Here is what I've done.
Step 1: Set WP_DEBUG to true from the wp-config.php file
Step 2: I tried domain.com/wp-login.php instead of domain.com/wp-admin by this I was able to get atleast login form and some errors of Warning: Cannot modify header information - headers already sent by
Step 3: I've added ob_start(); in wp-login.php file after <?php in first line, of course to get me in for a while.
Step 4: This trick worked. I've disabled all the plugins, and errors are gone.
Step 5: Activated all the plugins one by one to find which plugin is causing error, So that I can fix the error in particular plugin. Like there was one plugin adding style before wp_enqueque_style so I set it to a function and hook it properly.
There were some minor errors too like deprecated functions. Its up to you whether you want to correct it or use alternate plugin.
And Don't forget to remove ob_start from wp_login.php file. The core files should not be changed.
Hope this helps someone like me.
Inside your settings for your WordPress dashboard there are two fields named "WordPress address (URL)" and "Site address (URL)". These are also known as the "Home" and the "Site URL" settings for your website. The values need to match the server you're actually running on.
If you can't get to the admin, you can use phpmyadmin, go into your database, find the fields kin the wp_options table, and make sure they reflect your domain.
It should be enough in most of cases.
I've fought the dreaded "White Screen of Death" myself a few times. You can browse the threads at the Wordpress Support Site to glean some suggestions, or Google it for lots and lots of people's stories and advice dealing with these. I can't recommend a single, authoritative reference for this.
In most of my cases it was caused by whitespace after a closing ?> tag that got introduced because of changes in newline schemes between my dev and production servers, usually in a plugin.
You might also try putting Wordpress into debug mode or adding error_reporting(E_ALL); to the first line of your site's /wp-admin/admin.php file to see if these give you any hints.
I've personally been able to avoid these (touch wood) by using the XCloner plugin to make transfers between my Win dev machine and *nix production server.
Edit wp-content/themes/active-theme-folder/function.php and add this code just before:
<?php
define('WP_HOME','http://www.myurl.com'); //<-- NO TRAILING /
define('WP_SITEURL','http://www.myurl.com');
Add the below line into the wp-config.php file:
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
define('WP_SITEURL', WP_HOME . '/');
In you wp-config.php file just above the line stop editing line add this line:
define('RELOCATE',true);
/* That's all, stop editing! Happy blogging. */
Then go to your login URL, refresh the page and log in.
IMPORTANT: If you can log in, then remove the RELOCATE line before preceding any further. Then navigate to:
Settings > General
Set your Wordpress URL and Site address to the correct locations:
WordPress Address (URL): http://example.com/wordpress
Site Address (URL): http://example.com/myblog
Press "Save".
In many cases when migrating files to a different server this issue arises simply because of a minor error in one of your PHP files. The error is additional characters after the closing?> PHP tag in the file. These may just be simple whitespace or returns but they can often be the cause of the white screen of death.
A primary culprit is the functions.php file in your WordPress theme. Take a look at it in a plain text file editor (often available with most hosting accounts) and ensure you delete any lines after the closing tag.
If it's not in this file use error reporting to identify the culprit file, it may be in a plugin or another file in your theme.
As mentioned by Jon Surrell enable error display, change the following setting to true in wp-config.php.
define('WP_DEBUG', true);
I had the same problem after migrating to a local server.
A first attempt failed because there were many hardcoded filepaths in the database.
So I tried again and took care to create the same path as on the live server and the same hostname and databasename. Now the website was good but wp-login gave a white screen.
With wp-debug I found that the problem was caused by wp-super-cache plugin that had a full filepath hardcoded in the config.php
Changing this path to the full local path did the trick.
These are the steps I usually follow.
Upload files and database.
Set the correct file permissions.
Update the database configurations in the wp-config.php file to match the server db login.
Update the wp_options table for updating the site url and home url.
If everything goes well you should be able to login to the admin using the wp-login.php as the url.
The first thing next to do is to go to the permalinks and click save it will automatically update the .htaccess file. If there is no write permisson it will show you can copy it and edit the file via ftp.
Next thing you can easily update all the urls safetly with a plugin named velvet urls . Using it for many years. It will update all other urls in the database.
All these steps will be enough if everything goes correctly.
If you get a blank page or something you can turn on the error reporting and write the logs from the wp config file itself. You can try some of these to debug.
Just remove plugins from the folders one by one.
Remove the custom theme which you are using.
Unless you edited the core files mostly it will solve the issue. Only other chance is the version mismatch for php or mysql that is also very important thing to note while migrating. Hope this helps someone.
I'm adding this answer to the fray, in the hope, it might help somebody else. I followed all of the advice above to no avail. I actually had to hack the PHP files to force my administrator to have access to the panel. It's through the panel that I discovered that my administrator account was not assigned the administrator role.
This is my hack to "wp-includes/capabilities.php"
function current_user_can( $capability ) {
$current_user = wp_get_current_user();
if ( empty( $current_user ) ) {
return false;
}
return true; // HACK to get superuser power to any logged in user
$args = array_slice( func_get_args(), 1 );
$args = array_merge( array( $capability ), $args );
return call_user_func_array( array( $current_user, 'has_cap' ), $args );
}
This allowed the Administrator Panel to appear, with access to https://example.com/wp-admin/users.php and then I could assign the role. I then unhacked the capabilities.php to ensure all users had the correct rights, now that I had "Administrator" assigned to me.
everyone. A few days ago I ported by BlogVault the WordPress multisite instance. The process went smoothly, the sites worked as needed. But I could not get into the console, allways got the error "Your browser does not support cookies, please enable them and try again". I spent several days researching and figured out that the error occurs due to an entry in the code of the page "wp_options".
The original site uses the line
define ('COOKIE_DOMAIN', strtolower (stripslashes ($ _SERVER ['HTTP_HOST'])));
but the new server uses the line
define ('COOKIE_DOMAIN', mydomain.com);"
Replacing lines of code solved the problem. Hope this help somebody)
It's maybe a late replay, but hope it will help someone else.
In my case here are steps I used to resolve the issue.
Edit the wp-config.php file from your WordPress project root and change define('WP_DEBUG', true); instead of false.
Upload the same file to the project root for the new server.
Try to log in same as previously like www.yourDomain.com/wp-admin - Hope now you are able to login the backend admin
Go to settings -> Permalinks - under common settings - choose the radio button plan then click SAVE button for a sake, then again choose day and name SAVE again, don't forget to click save, got back your domain and check your site, the inner pages should work perfectly fine.
Go back to wp-config.php and revert the value to false and upload again.
That's it.
I am not a wordpress developer but the above solution was perfectly fine for me and didn't find anywhere it's explained properly.

Categories