Saturday, 25 June 2016

How to Fix an Installed, but Broken WordPress Theme

by Erin McManaway, Demand Media
WordPress is a free blogging content management system that allows you to create your own customized blog and post content to the Internet. You have complete control over how your blog looks and responds to visitors through blog themes. The WordPress community has designed many free themes, which you can install directly from the WordPress theme library. If your theme is installed but broken, you can edit the theme file manually, or, in the worst case, reinstall the theme again to make it work right.

About WordPress Themes

WordPress themes control the look and feel of your WordPress blog, from the layout and graphics to the colors of text and links. When something is broken within your theme, you may see a distorted or incorrect layout when you access your blog. The most extreme issues may display PHP errors on your blog, which indicate broken coding in your theme. If you have made changes to your WordPress theme coding or use custom images, you should back up your WordPress theme before troubleshooting, in the case you need to reinstall completely.

Backing Up WordPress Theme Files

You will need a FTP client and the FTP account login information to back up your WordPress theme files. Log into the FTP client and navigate to the “wp-content/themes” folder on your website host. You will see a list of folders, each named for the different themes that are installed on your blog. Highlight the theme folder you are troubleshooting and transfer it to a folder on your computer in order to create a backup.

Edit Broken File Coding

If you are comfortable with troubleshooting coding, you can edit the WordPress theme files directly from the dashboard. Log into your WordPress blog and click “Appearance.” Select “Editor” from the menu to see a list of files for your theme. Select the theme file you want to edit and change the code in the text box. When you save the changes to the file, you will automatically see the changes on your WordPress blog, allowing you to troubleshoot layout issues as you code.

Reinstall WordPress Theme

If the theme is reporting PHP errors and you are not comfortable with coding, you should reinstall the theme to return it to the default coding. Click “Appearance” on your dashboard, then click “Themes.” Activate a different theme on your blog temporarily, then click “Delete” under the broken theme to remove all of the files. Click “Install Themes” from the top of the page, search for the name of the theme and reinstall it from the WordPress library to reset the theme.

How to fix iOS 7 beta activation errors

BY ALLYSON KAZMUCHA 


If you're updating an iPhone from iOS 6 to a beta version of iOS 7 for either development or testing, Apple will check the UDID of the device in order to make sure it's registered to a developer account. I ran into an issue this past week where an iPhone that was legitimately registered to my personal developer account would not activate. After a quick internet search, I discovered I definitely wasn't alone in having this problem. Luckily, I was able to find a way around it. Here's how:
As always, this isn't a way to bypass activation if your UDID isn't on file, nor will it work that way. This is a workaround if you're experiencing issues activating a device that hasn't been on a beta before but that is legitimately registered to a developer account.

Restore to iOS 6

Before you can fix the activation error, you will need to downgrade the iPhone having activation issues back to iOS 6. In order to do this, you can follow our downgrade guide.
Once you have the device back up and running on iOS 6, continue in order to finish your iOS 7 beta install.

Update to iOS 7

If you're having activation issues, odds are you probably clicked theRestore option in iTunes when installing iOS 7 beta instead of theUpdate option. Normally this isn't an issue but lately it seems to not want to play nice with activation.
This is what seems to be causing issues lately with installing a new iOS 7 beta. Follow these steps instead:
  1. Connect the device to your Mac or PC if it isn't already.
  2. Launch iTunes.
  3. Under the device options, hold down alt+option on your Mac keyboard (Shift for Windows users) and then click Updateinstead of restore.

  4. How to fix iOS 7 beta activation errors 
  5. Navigate to the current iOS 7 beta file that you've downloaded from the developer portal and select it.

  6. How to fix iOS 7 beta activation errors
  7. Let iTunes do its thing and update the device.
  8. That's all there is to it. This should fix the activation issue and the device should boot up like normal and be able to activate this time. Let us know how it works for you in the comments if you were experiencing legitimate activation issues.
    Remember, this method is for users who legitimately have their UDID on file with an Apple developer account. If you don't have a reason to install the beta, stay away until the public release. It should also neverbe installed on a user's primary device.
  9. -imore

Friday, 24 June 2016

HOW TO FIX IPHONE 3G ERROR 1015

You may often encounter iPhone 3G error 1015 while restoring iTunes on iPhone. It is one of the common errors faced by iOS users. The iPhone 3G error occurs because your baseband is flashed with the baseband of iPad and thus iTunes could not update it and hence gives iPhone 3G error 1015. But fixing the iPhone 3G error 1015 is not at all a very big issue.  At this point of time, you can either upgrade it to 4.2.1 or downgrade it to 3.1.3 version. While going through the fix, you will be required to update the host file. While doing so, Administrative rights will be required.
The following sections will lead you to different methods to fix iPhone 3G error 1015. Each section will provide a different method and you got to choose any one of them depending upon your exact problem.
HOW TO FIX IPHONE 3G ERROR 1015

HOW TO FIX IPHONE 3G ERROR 1015

METHOD 1: FIX IPHONE 3G ERROR 1015 FOR NON-JAILBROKEN IOS

If your phone has not been jail broken and it is in a normal condition and you are encountering iPhone 3G error 1015, then you need to go through the steps mentioned below in order to fix it.
  • First of all, you need to download iOS 4.2.1.
  • Download Recboot on windows.
  • Download latest version of iTunes.
  • After completion of all these downloads, you need to switch your iPhone into recovery mode.
  • Connect your iPhone to your PC using USB.
  • While holding shift key, click on restore button in iTunes and browse your iOS 4.2.1 that you downloaded in step 1.
  • Windows will start restoration process for iOS 4.2.1.
  • Now you will again get iPhone 3G error 1015, but you need not worry. This is the when recboot will be in action.
  • After getting iPhone 3G error, your phone will automatically switch into recovery mode.
  • Click on Exit Recovery button in Recboot window.
  • Now your phone will start normally.

METHOD 2: IPHONE 3G ERROR 1015 FOR JAILBROKEN IOS

If you are working with a jailbroken iOS, then you need to go through the steps given below in order to fix iPhone 3G error.
  • Download iOS 4.1 for your iPhone 3G.
  • Update the firmware of the phone to the latest download firmware. You can do this through the latest version of iTunes.
  • Now you need to download Redsnow 0.9.6b1. Windows and Mac users can download Redsnow from the respective links given below:
  • Run Redsnow.
  • Browse and select .ipsw file for the downloaded firmware.
  • Click next button.
  • Redsnow will start patching the kernel.
  • Now you need to uncheck Install Cydia and also uncheck Enable battery percentage.
  • Check mark the Just enter pwned DFU mode right now enlisted at the bottom.
  • Click on Next button.
  • Turn off your iPhone 3G and connect it to your PC via USB. Now press the Next button.
  • Now Switch your phone to DFU mode. In order to switch yout iPhone to DFU mode you need to hold Power button and Home button simultaneously for about 4-5 seconds. After 4-5 seconds, release the power button but keep holding the Home button until installation begins.
  • Wait until Redsnow completes jailbreaking.
  • Your iPhone will start automatically normally.
-techanges

How To Fix “Error Establishing A Database Connection” In WordPress

It’s one of a website owner’s worst fears.
You type in your website’s URL… but what greets you isn’t your familiar home page.
Instead, it’s a blank screen. No matter what link you try, everything’s missing, except for the ominous words:
“Error establishing a database connection.”
The longer your website is down, the more traffic you’ll lose. And that could mean lost subscribers, lost customers, and ultimately lost revenue.
But what exactly does that error even mean? And more importantly, how can you fix it and get your website back to normal as soon as possible?
In this article, we’ll go over exactly what the error message means and what could be causing it, and then I’ll walk you through some steps to troubleshooting and fixing the problem.
(Want to skip the analysis and start troubleshooting? Just click here to skip ahead.)

What Does “Error Establishing a Database Connection” Mean?

First, let’s take a look at how WordPress works to display your website, and it’ll become clear why this error is so devastating.
The WordPress software is written using PHP and MySQL. Why two languages? Because all the information that makes up your website is stored in a MySQL database, and WordPress uses PHP to store and retrieve information from that database.
Generally, whenever a page is loaded on your website, it’s built on-the-fly. PHP code is used to access your MySQL database and retrieve every bit of information needed to create the page. There’s a PHP query to access the post title, another to grab the author name, another to retrieve the publication date, and so on.
Back to your error message: “Error establishing a database connection.” This means that for some reason the PHP code was unable to connect with your MySQL database to retrieve the information it needs to build that page.
That’s why this error is often all you see on an otherwise blank page. If you can’t connect to your database, there’s no way to know what to display; no information about your website is available.

What Causes This Error?

While the meaning of the error message is clear, the reasons behind its occurrence often aren’t.
There are many reasons why your website could be having trouble connecting to your database, but they generally fall into three categories:
  1. Your login credentials for your database are wrong. Your database uses separate login credentials (username and password). If those credentials have recently been changed, your website won’t be able to access the database with the old credentials.
  2. Your database is corrupted. Any number of things could cause your WordPress database to become corrupted, from uploading a bad plugin, to lightning strikes to the server (seriously — though luckily that isn’t too common).
  3. The server that hosts your database is down. Your database’s server may be down due to a problem or error on the part of your web hosting company, or you could be experiencing a big traffic spike that your server just couldn’t handle.
So with all these possibilities, how can you narrow down the problem and fix it?

Troubleshooting “Error Establishing a Database Connection”

1. Determine where the error is occurring

Can you see your website normally, but get the error when trying to access wp-admin? Or maybe your website is down, but you’re getting a slightly different error when you try to login: “One or more database tables are unavailable. The database may need to be repaired.”
These are signs of database corruption.
WordPress has a built-in way to attempt to repair your database, but you’ll have to enable this feature first. To do so, you’ll need to access your wp-config.php file, which contains your WordPress installation settings and configuration.
You can find wp-config in the your root WordPress file directory. You can access it by logging into your cPanel, selecting File Manager, and navigating to the folder where you installed WordPress.
Once you have wp-config open, add this line of code to the bottom:
define( 'WP_ALLOW_REPAIR', true );
This line will enable you to optimize and repair your database by navigating to www.yourwebsite.com/wp-admin/maint/repair.php (just replace “yourwebsite.com” with your actual URL).
How To Fix “Error Establishing A Database Connection” In WordPress 
You should see the above screen with two options to repair, or repair and optimize, your database. Feel free to choose either; just note that optimizing will take longer.

Please note that this database repair page is not secure; anyone can access that URL without having to login. Once you’re done repairing your database, be sure toremove the line of code you added to wp-config. This will disable access to the repair page and prevent anyone else from messing with your database.
(Just as a side note, there are other ways available to repair and optimize your WordPress database, including via PHPMyAdmin in cPanel. I wrote a bit about it here:Cleaning Up Your WordPress Database To Optimize Your Website’s Performance)
Keep wp-config open for now until you’re certain the error is resolved and your website is working again. If you’re still getting the same error message, you’ll need wp-config open for the next step.
If this doesn’t apply to you, or if it didn’t work, move on to the next step to continue troubleshooting.

2. Check your database login settings in wp-config

If the above step didn’t work or didn’t apply to you, then the next thing you can do is take a look at your database settings in your wp-config file.
Wondering how your database login credentials could have suddently stopped working? Things like switching hosting companies or changing anything about your database name or user information could cause the error if your wp-config file wasn’t updated to the new information.
You may still have the wp-config file open from the last step. If not, log into your host’s cPanel and open the File Manager. Navigate to the directory where you installed WordPress, and look for a file called wp-config.php. Go ahead and open that for editing.
You’ll see the login credentials for your database, probably near the top of the file. It should look something like this:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
 
/** MySQL database username */
define( 'DB_USER', 'username_here' );
 
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
 
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
As you can see, there are four pieces of information WordPress needs to access your database:
  1. The name of the database (“DB_NAME”)
  2. The login username (“DB_USER”)
  3. The login password (“DB_PASSWORD”)
  4. The database host (“DB_HOST”)
If any one of these values is incorrect, WordPress will not be able to connect to the database.
One way to check on your database outside of WordPress is by using PHPMyAdmin, a tool for accessing and editing MySQL databases. PHPMyAdmin is included with most hosting plans, and you can find it in your cPanel dashboard.
Warning: Be very careful using PHPMyAdmin, since you’ll be dealing directly with your site’s database.
Once you’ve logged in to PHPMyAdmin, you will see a list of databases on your server in the left-hand column. Click on the one that matches the name in your wp-config file (it will be the value after DB_NAME, where it says “database_name_here” in the above sample code).
(Don’t see any databases? Contact your hosting company, since the entire problem may be an issue with your server.)
After clicking on your database name, you’ll see the main screen populate with the names of the tables in your database. To make sure this is the correct database, you can find the table named “wp_options” and click on the ‘Browse” option next to it. You should see your website’s name, URL, and your other general settings here. Now you know whether or not you have the correct database name in your wp-config file. If it’s not correct, go ahead and fix it in wp-config.
Now let’s check on the username and password.
There are a few ways to do this, some more convoluted than others. I’ll give you two options.
  1. You can either create a simple .php file to test whether you are able to connect to your database with the credentials in your wp-config file, or
  2. You can just create a new user and password, and update your wp-config file with the new info. You’ll have to do this if #1 fails, so you might just want to skip to this step.
Option 1: Test your existing credentials.
Create a file in your WordPress directory called something like testconnection.php (the name doesn’t matter; just the .php extension). Paste the following code:
<?php
$test Connection = mysql_connect('localhost', 'root', 'password');
if (!$testConnection) {
die('Error: ' . mysql_error());
}
echo 'Database connection working!';
mysql_close($testConnection);
?>
Once you’ve created that file, just navigate to the URL of the file in your browser (e.g. your site.com/testconnection.php). You’ll see either a successful connection message, or an error with more details.
If the username and password isn’t working, we can just create a new one.
Option 2: Create a new database user and password.
We can do that using a different tool available in cPanel called “MySQL® Databases.” Go ahead and click on that, then scroll down to the heading: MySQL Users: Add New User.” Choose a username and strong password, and make note of them for your wp-config file. Click “Create User.” Now scroll down to the heading “Add User To Database,” and choose your new username and your WordPress database, and click “Add.” Update your wp-config file with the new username and password.
Now your database name, username, and password are all correct. That just leaves DB_HOST.
In most cases, this value will be “localhost,” but it depends on your host’s settings. WordPress has a list of common hosts with their DB_HOST values on their website. If your host isn’t listed there, you can contact your hosting company to ask what value to use.

3. Still getting the error message? Check with your hosting company

If you’ve followed the above troubleshooting steps and your website is still down, it could be a problem on your host’s end. Contact your web hosting company’s support and give them all the details of the error and the troubleshooting actions you’ve taken, and they may be able to help you determine the cause of the error.
-elegantthemes