wordpress plugins

How to Fix WordPress Blank White Screen | WordPress, blank white screen

So your WordPress site is suddenly Not Working,

http://blog.gameznet.biz/wp-content/uploads/wordpress_tips_full114.jpg

All Your seeing is a blank White Screen

Don't worry all is not lost!

These tips apply for all WordPress version. WordPress is one of the most used and powerful blog engines. And with the all community support, many plugins are developed to make WordPress more powerful and feature rich. But not all plugin developers code their plugins to WordPress standards and sometimes this will create problems with the most annoying problem being a blank page error.

No error message, just a white blank screen. The first tip is “don’t panic“.

Analyze your website in these steps:
1. Check your hosting server

The first step is check your hosting server by going to your server administration (usually cpanel). Check if that’s live or not. If not then contact your hosting server support.
If alive then the problem is likely to be on your blog.

2. Check wp-admin

Check your wp-admin folder by go to http://www.yoursite.com/wp-admin
See if it is alive and not blank.
If it is not blank, then your WordPress doesn’t have a problem.
You can check your themes and files on the root folder. If it is blank, then there are lot of possibilities, but most of the time it is plugins and themes.

3. Check for index.html and .maintenance files
Yes, check if there is a blank index.html in your root folder.
I know it seems odd but if there is a blank index.html in the root then it may be the culprit. Delete it and check your site again.

If your wordpress site is stuck with a "Maintenance Message" go to the root of your instalation and delete the file .maintenance and check your site again, that may fix the problem, if not keep going.

 

4. Check error_log

Open your favorite FTP client program then downoad error_log file at the root of your blog. Analyze it, see what make your blog errors. Usually i found out what make it errors in this file. Usually it will be a memory problem, file not found problem, and so on. Pay more attention to the error message and fix it.
5. Fix: WordPress Memory Exhausted Error – Increase PHP Memory

If you see sometimes a WordPress Memory Exhausted error showing up after activating or updating a new plugin or doing some other task. Usually the error looks like this:
Fatal error: Allowed memory size of xxxxxxx bytes exhausted (tried to allocate xxxxxx bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

This error occurs as WordPress tries to access more memory then it is allowed to by the “Server PHP configuration” or “WordPress Setting”. Increasing the Memory Limit will solve it.

There are numerous solutions for it, but for this article lets just look at the simplest one of all. Open your wp-config.php which is located in the root WordPress directory.

Look for the following line: $table_prefix = 'wp_';

imediatly after that line add the following line:
define('WP_MEMORY_LIMIT', '64M');

(or higher value if required)

If you still get the error after this fix, you may have to contact your host and ask them to increase your memory limit.
This is not a complete fix since your blog will be using more resources than it should which if you have a lot of traffic may become a major problem and could get your hosting account suspended so it is best to resolve this issue properly. The memory problem is most commonly caused by a plugin so you might want to remove the last plugin that you installed by deleting the plugins folder from your wordpress /plugins directory or moving it temporarily outside of the plugin directory.

Next go back and change the memory limit back to 32 by commenting out the line you entered into your wp-config.php and then see if things work, if they do then it definately is that particular plugin giving you the memory issue. Best not to use it but also best to contact the plugin creator and let them know of the issue so they can work on it.

Depending on your needs, server condition, plugins installed, and size of your site, you could use 32M, 96M, 128M, 256M, 512M, 1024M, 2048M, 4096M.
Make sure your server allows you to use that much dedicated memory, if your unsure contact your host and ask.

If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 64M:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 64M

If all else fails contact your webhost support or the person managing your server.

 

6. Rename plugin dir

To check if there is an error with any individual plugin, rename your /plugins/ folder and create a new empty one.
Now access your wp-admin. If the wp-admin show up, then it is definatly a plugin error. Now it’s your job to find out which plugin is causing the issue.
You can move your plugins back into the new plugin folder one at a time . Make sure its active and then check your site.

 
7. Check all the plugins

To check all the plugins, use cpanel to move all plugins into a temp directory.
(I usually just rename the plugin directory from plugins to plugins_OFF then create a new folder called plugins)
Now put them back one by one into the empty plugins folder, and check wp-admin each time until the blank page error comes back.
When it does you will know "that is the offending plugin"
Get rid of it, if you think you need it then contact the plugin creator for support.

So like i said please don’t panic, check all your installation, plugins and themes folder.
If it is still not working, contact your hosting support and ask them to help you.

Cannot Upgrade Plugins

If your having trouble Upgrading a Plugin and in particular getting an error when you run the automatic update feature for plugins and themes that says something like: could not create directory. /public_html
Try deleting the upgrade directory found within wp-content/upgrade and then recreate it manualy.
Also chmod wp-content/upgrade to 777 and see if that fixes the problem.

I have had to do this on several wordpress 3.0 sites, not sure why it happens but this has fixed the issue for me.

How to Fixing WordPress has_cap error notices | has_cap error,wordpress

 

http://blog.gameznet.biz/wp-content/uploads/error_button39.png

 How to Fix the common has_cap error notices in your WordPress site

A  common error that is popping up a lot with later versions of wordpress looks something like this:

Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home/xxxx/public_html/wp-includes/functions.php on line xxxx

this can usually be traced back to a plugin and  the error may only show when debug mode is turned on in your wp-config.php file

Often the recommended fix is to simply get rid of these errors by turning off debug mode but that does not fix anything, it just stops the error from being displayed on the site.

I prefer to leave debug mode on and actually correct any errors.

These kinds of errors seem to result as an incompatibility problem with some functions like "get_options" that are no longer  working correctly with wordpress 3.0. and above.
Perhaps the functions work ok but the parameters are no longer correct.

 

To find the solution we need to disable plugins one by one, until you find the one that is causing the warning. Then, find a call like "add_submenu_page" or "add_options_page" or similar, that is using a numeric user level instead of a capability name. Substitute the numeric user level with a compatible capability or user role and the warning should vanish.

Here is an example using WP v.3.2.1 and Audio-Player v.2.0.4.1 plugin which was giving this error:

To fix this problem you need to edit the plugin file, you can do this via cpanel by navigating to the file and using the cpanel file editor, or download the file and edit it in a text editor such as notepad or edit it directly from within wordpress which I find the quickest method.

go to line 176 of audio-player.php (/wp-content/plugins/audio-player/audio-player.php)

of course other plugins will require some searching to find the correct line but you will be looking for a similar line which starts with
"add_options_page" or add_submenu_page"  The line will look something like this: $pageName = add_options_page  

Moving on with the example...

Once you have the file open in your chosen editing method:
$pageName = add_options_page("Audio player options", "Audio Player", 8, $this->optionsPageName, array(&$this, "outputOptionsSubpanel"));

Change the 8 (a numeric user level) to 'activate_plugins' (single quotes included), so that the line looks like this:
$pageName = add_options_page("Audio player options", "Audio Player", 'activate_plugins', $this->optionsPageName, array(&$this, "outputOptionsSubpanel"));

 

so for a different plugin simply do a search for "add_options_page" and loog for a number value being used (8 in the above example)
change 8 to "activate_plugins"
..  save and hopefully your error has gone.

This is only one particular fix for the above specific plugin which was using the number "8" instead of "activate_plugins"  in relation to  add_options_page

------------------------------------------------------------------------------------------------------

Troubleshooting Other Plugins

The main issue seems to be a problem with defining roles and capabilities within WordPress.

When we register a new user we can define their roles (Admin, Super Admin, Editor, Contributor, Subscriber).
Each of these roles has different skills (reading a page / post, edit a page / post, add a page / post, etc)
To learn more about the roles and capabilities provided useful wordpress codex: http://codex.wordpress.org/Function_Reference/add_menu_page

If we have a plugin or template that generates a new menu in our back end functions such as safely used add_theme_page, add_menu_page, add_submenu_page, add_options_page etc

Consider the statement of one of these functions
<? Php add_menu_page ($ page_title, $ menu_title, $ capability, $ menu_slug, $ function, $ icon_url, $ position);?>

The third parameter, $capability, accepts as a value that defines the different capabilities of WordPress. This menu gives access to only users (roles) that have that capability.

The error in question is generated because we do not pass a value of type capacity, we offer a value of type User Level, the old system to limit user roles.

IMPORTANT: The user levels ceased to be used in WordPress 2.0 and in WordPress 3.0 they were completely eliminated.
If a plugin developer has not updated their plugin then you will get these errors.
Read more here: http://codex.wordpress.org/User_Levels

In case you do not understand much I'm posting a link which helped me to understand that this was the problem: fix-notice-has_cap-was-called-with-an-argument-that-is- deprecated-since-version-2-0-in-wordpress /

Using any numeric setting for the capability setting will cause the infamous error notice.

So for example, using 10 versus 'manage_options' will cause this same kind of error notice.

when troubleshooting your plugins use the table at the bottom of http://codex.wordpress.org/Roles_and_Capabilities#User_Level_to_Role_Conversion to figure out the right string value.

If you have shell access you can also run this command on your plugins directory to find all of the plugins suffering from the same condition:  

(change number values as required eg you may need to enter number 10 instead of 0-9 )

grep -HnR "add_[a-zA-Z].*_page.*, [0-9]*," ./

 I ran that command over my plugins directory and found 14 plugins using the old numeric role identifier :-/ .

I have come across this error in many plugins. Often reporting the error to the plugin developer will help them become aware of the issue and it is relatively easy for them to address it and bring their plugin up-to-date. otherwise you can fix it within your plugins yourself however do be aware that if the plugin later gets updated by the developer within the wordpress repository without the correct fix for this issue being applied and you then run the automatic plugin update then your fix will get overwritten and the error will return so it is always best to notify the plugin developer and get them to  fix their plugin at the source. You can always fix it yourself and then provide the developer with the information about how you corrected the problem manually on your own site and most developers will more than likely be grateful for you taking the time to notify them and make their job easier by even giving them a fix.  To do this you can visit the plugins page in the wordpress repository and visit the developers support  forum or send them an email.