Scroll Top
19th Ave New York, NY 95822, USA

We have been working more and more with WordPress, so we thought we would list the top 10 most uncommon issues that can occur if you ever use WordPress over a preiod of time.

How to Hide the Admin Bar

The easiest way to do this is to make a change to your css by adding the following;

#wpadminbar
{ display: none; visibility: hidden; }

The benefits are that this will not change your core code, and it will allow you to bring it back easily if you need to.

An Unexpected HTTP Error occurred during the API request.

This is a common issue if you have an old version of WordPress, usually 3.2. You can do it by making the following change.

Edit file plugin-install.php
in directory wp-admin/includes
and find the timeout setting. It is by default set to 15. Increase to 60.
$request = wp_remote_post(‘http://api.wordpress.org/plugins/info/1.0/’, array( ‘timeout’ => 60, ‘body’ => array(‘action’ => $action, ‘request’ => serialize($args))) );

However we highly recommend you just update your core.

Help My Site Has Been Hacked

We covered a lot of this in our post when we were hacked.

  1. Don’t Panic
  2. Backup everything on a local drive/folder that you have marked as HACKED code
  3. Use Sucuri’s scanner on the live site. Again, confirm the original diagnosis.
  4. Scan for iframes, and BASE64 coding.
  5. Look in the header.php for suspicious code.
  6. Get to the cause, search for current known vulnerabilities, look for problems with timthumb
  7. Do a fresh install of WordPress, a fresh theme as well if you can, only upload your theme and database
  8. Test your site again
  9. Install WordPress firewall2 and any other security plugins you feel necessary.

PHP Deprecated’ warnings on every screen

Installing WordPress on a IIS3 or Windows server has its own problems. In your wp-settings.php file, you’ll find this code:
// Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development. if (defined('WP_DEBUG') and WP_DEBUG == true) { error_reporting(E_ALL); } else { error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE); }
Change that “E_ALL ^ E_NOTICE ^ E_USER_NOTICE” bit to zero.

How do I change Password Protected text?

If you have an installation that you want to use password protected pages, there is a chance you might want to customise how those pages are presented. All you have to do is add the following to your functions.php file

<?php add_filter( 'the_password_form', 'custom_password_form' ); 
function custom_password_form() { 
global $post; $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); 
$o = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> ' . __( "This post is password 
protected. To view it please enter your password below:" ) . ' <label for="' . $label . '">' . __( "Password:" ) 
. ' </label><input name="post_password" id="' . $label . '" type="password" size="20" />
<input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /> </form> '; return $o; 
} ?>

Fatal Error: Out of Memory

This is common on shared server installs, or installs where you are trying to upload a big plugin or media. It is relatively straight forward to change;

1) Add/edit a php.ini file in the root/public_html folder of your site. Add/change the values for memory_limit. By default it should see memory_limit = 8M. Try changing it to 24M.

2) If you can’t find the php.ini file, open up the PHP file which requires more memory and add this line just after ini_set(’memory_limit’, ‘12M’); we can increase memory upto 16M or 24M to resolve the issue. But do it try with 12M first.

3) In last, open the .htaccess file from the root/public_html folder and add this line php_value memory_limit 12M

I have lost my password/user can I recover from PHPMyadmin?

Losing your password should be fine if you want to recover it back to your email address, but if this is not an option, then you have to rely on PHPMyadmin.

All you have to do is go to the user table, and change the password from there. You will have to make sure that the encoding is set to MD5 or it will not work.

How can I make an admin user with PHPMyadmin?

If you are a looking to add/change a user to become an administrator, it is a little more complicated than a lost password. First you have to add the user to the table, making sure that the level is set to 0. Then in the user_meta table you have to add the following;

  1. Click on the “Insert” tab to insert a new row.
  2. Fill in the following information
    1. umeta_id – leave this blank it is automatically generated
    2. user_id – this is the id of the user you created in the previous steps
    3. meta_key – for this step insert wp_capabilities
    4. meta_value – insert exactly this – a:1:{s:13:"administrator";b:1;}
  3. Insert another row with this information
    1. umeta_id – leave this blank it is automatically generated
    2. user_id – this is the id of the user you created in the previous steps
    3. meta_key – for this step insert wp_user_level
    4. meta_value – insert 10
  4. Click the “Go” button in phpMyAdmin to insert the row.
Share

Comments (2)

I am going to look into this. My big issue with cloud backup was always the initial load times.

Thank you so much for these great tips, very good

Leave a comment