Affichage des articles dont le libellé est Troubleshooting. Afficher tous les articles
Affichage des articles dont le libellé est Troubleshooting. Afficher tous les articles

samedi 12 novembre 2016

Beginner’s Guide to Troubleshooting WordPress Errors (Step by Step)



Are you encountering a common WordPress error on your site? Do you want to troubleshoot these WordPress errors on your own? Most of these errors can be solved by following easy troubleshooting steps. In this beginner’s guide, we will show you how to troubleshoot WordPress errors one step at a time.


Troubleshooting WordPress errors


1. Create a Complete Backup of Your WordPress Site


First thing you should do is to create a complete backup of your WordPress site. If you were already using a WordPress backup plugin, then make sure that you have a recent backup safely stored somewhere.


If you were not using a backup plugin, then you should start using one immediately. However, in case you don’t have access to the admin area of your WordPress site, then you will need to manually backup your database and files.


Backups allow you to restore your WordPress site easily when something goes wrong. They are your first and most important defence against security threats, hacking, and data loss.


2. Deactivate All Plugins Installed on Your Website


Most of the times errors are caused by a plugins conflicting with each other, your theme, or the WordPress core. Deactivating all WordPress plugins on your site will most likely solve the problem. You can then find out which plugin was causing the issue by activating plugins one by one on your site.


If you have access to the admin area of your WordPress site, then simply head over to the plugins page.


Select and deactivate all plugins in WordPress


First you need to select all plugins, and then select ‘Deactivate’ from ‘Bulk Actions’ drop down menu. Click on the Apply button to deactivate all selected plugins.


If you do not have access to the admin area, then you will need to use FTP or phpMyAdmin to deactivate all plugins.


Simply connect to your website using an FTP client. If you haven’t used FTP before, then you may want to see our how to use FTP to upload files to WordPress.


Navigate to the wp-content folder and rename plugins folder to “plugin.deactivate”.


Rename plugins folder using FTP


For more detailed instructions, see our article on how to deactivate all plugins when not able to access wp-admin.


3. Switch to a Default WordPress Theme


Sometimes your WordPress theme can cause issues on your site. You can easily find out if your theme is causing an issue by switching to a default WordPress theme like Twenty Sixteen or Twenty Fifteen.


Head over to Appearance » Themes page and then click on the Activate button next to a default theme.


Switch to a default WordPress theme


However, if you don’t have access to the admin area of your WordPress site, then you will need to use FTP to switch theme.


Connect to your website using an FTP client and then navigate to /wp-content/themes/ folder. Download your current active theme as a backup to your Desktop.


After that you need to delete all themes except a default WordPress theme like TwentySixteen. Since your active theme will no longer be available, WordPress will now automatically switch to using the default theme available.


If your theme was causing the issue, then you should be able to log in to your WordPress site now.


4. Refresh Permalinks


WordPress uses SEO friendly URL structure or Permalinks. Sometimes the permalink structure is not updated or configured properly, which may result in unexpected 404 errors on your site.


You can easily refresh permalinks without changing anything on your WordPress site. Visit Settings » Permalinks page and click on ‘Save Changes’ button without changing anything.


Update permalinks in WordPress


5. Backup and Delete .htaccess File


A corrupt .htaccess file is often the cause of the internal server error.


First you need to connect to your website using an FTP client. The .htaccess file is located in your site’s root directory.


Since it is a hidden file, you may need to force your FTP client to show hidden files. See our article on why you can’t find .htaccess file on your WordPress site


You need to download the .htaccess file to your computer as a backup, and then delete it from your web server.


You can now try to login to your WordPress site and go to Settings » Permalinks page. Click on the Save Changes button to refresh your permalinks and to regenerate a new .htaccess file for your site.


6. Fix WordPress Site URL


Having incorrect settings for WordPress URL and Site URL options can also cause redirect issues, 404 errors, and some other common issues.


WordPress URL and Site URL options can be changed from admin area by visiting Settings » General page.


Changing WordPress Address and Site Address options from admin area


Make sure that both URLs are exactly the same.


If you do not have access to the admin area of your WordPress site, then you can change these URLs using FTP. There are two ways to do that using FTP:


Update WordPress URL and Site URL Settings in wp-config.php File


Once connected to your website using an FTP client, locate wp-config.php file. Now you need to edit this file in a text editor like Notepad.


Go to the line that says /* That's all, stop editing! Happy blogging. */, and just before it, add this code:



define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

Don’t forget to replace example.com with your own domain name. Now save your changes and upload the file back to your server.


Update URLs Using functions.php File


You can also update URLs using your theme’s functions.php file.


Open your FTP client and navigate to /wp-content/themes/ folder. Open your current active theme’s folder and locate functions.php file inside it. Now you will need to edit the functions.php file in a text editor like Notepad.


Simply add these lines at the bottom of the functions file:



update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

Don’t forget to change WordPress URLs from the settings page after you login to your site. Once you have added them on the settings page, you need to delete these lines from your theme’s functions file.


7. Check Reading Settings


If your newly created WordPress site is not indexed by search engines, then this is the first thing that you should do.


Login to your WordPress site and go to Settings » Reading page. Scroll down to the bottom of the page and make sure that the box next to ‘Search Engine Visibility’ is unchecked.


Search engine visibility


This option allows you to discourage search engines from showing your website in search. It is used by webmasters when they are working on a website which is not ready to be live. Sometimes you can accidentally check this setting and forget about it.


Make sure that this option is unchecked when your website is ready to go live.


8. Troubleshooting Email Issues


Many WordPress hosting providers do not have mail settings properly configured. This stops you and your users to receive emails from WordPress.


If you are using a contact form plugin, then you will not be able to receive those emails as well. You will also not receive any WordPress notifications.


See our complete step by step instructions in our article on how to fix WordPress not sending email issue.


9. Scanning for Malware and Backdoors


If you suspect that your WordPress site is affected with malware, then you should scan your website with Sucuri. It is the best website security monitoring service for WordPress site owners.


See our case study of how Sucuri helped us block 450,000 WordPress attacks in 3 months.


For more detailed instructions, see our guide on how to scan your WordPress site for potentially malicious code.


Getting Better Support


After following the above mentioned troubleshooting steps, you would be able to fix many of the most common WordPress errors. However, if the problem persists, then you can seek further support.


WordPress is a community software, so you can get help from the community by posting in WordPress support forums. Here is how to write a better support request:



  • Be polite and nice. No matter how upset or frustrated you are, do not use harsh language.

  • Mention your problem briefly.

  • Describe troubleshooting steps you have taken so far.

  • Uplaod screenshots on a cloud image sharing service, and then add the links in your support thread.


For more on this topic, take a look at our guide on how to properly ask for WordPress support and get it.


We hope this article helped you learn how to troubleshoot WordPress errors. You may also want to see our list of 14 most common WordPress errors and how to fix them.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post Beginner’s Guide to Troubleshooting WordPress Errors (Step by Step) appeared first on WPBeginner.







Troubleshooting When Your WordPress Migration to a New Host Becomes a Nightmare



alt="Troubleshooting When Your WordPress Migration to a New Host Becomes a Nightmare" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/web-hosting-500x416_c.jpg" />

You’ve decided to make the plunge and move your WordPress site to a new hosting company. At first, the transition seemed to go fairly smoothly. After all, you used the WHSR’s href="http://www.webhostingsecretrevealed.net/blog/web-hosting-guides/switching-web-host/" target="_blank">Switching Web Hosts guide. However, now your images aren’t showing or your pages are out of whack. Maybe you can’t pull up your databases at all.

Few things are as stressful as planning to seamlessly move your website to a new host only to find out that things aren’t going as planned and your site isn’t running efficiently. In fact, it is the reason many website owners decide to stay with a host they have either outgrown or who is not giving them the service they deserve. Avoiding migrating to a new server is no reason to put up with poor service, though, because there are some simple things you can do to easily solve some of the more common issues you’ll run into with switching hosts.

WordPress sites can be a challenge to move to a new service. WordPress offers href="http://codex.wordpress.org/Moving_WordPress" target="_blank">detailed instructions on how to move a website to a new host. You can follow their guide step-by-step and at the end of the day you will stay run into a few problems that need to be tweaked. This is frightening for website owners who don’t completely understand PHP coding or who may not be sure how to fix a database if it gets corrupted.

Simple Workarounds for Broken Images

id="attachment_10331" style="width: 310px" class="wp-caption alignright">href="http://www.webhostingsecretrevealed.net/blog/wordpress-blog/troubleshooting-when-your-wordpress-migration-to-a-new-host-becomes-a-nightmare/attachment/ftp/" rel="attachment wp-att-10331">class="size-full wp-image-10331" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/ftp.jpg" alt="ftp" width="300" height="225" />class="wp-caption-text">Photo Credit: href="https://www.flickr.com/photos/87863966@N00/450397468/">buggolo via href="http://compfight.com">Compfight href="https://creativecommons.org/licenses/by/2.0/">cc

One of the most common issues with WordPress moves is images not linking up correctly or not appearing in your media library. This can make it impossible to paste images already uploaded to your site into future articles. In addition, current articles and featured images may occur as a broken image.

Upload Images and Upload Database

The first thing to try that usually works requires a couple of steps.

  1. Login to the new host with an FTP program. I like Filezilla, but you can use whatever you prefer and is easy for you to work with. Upload your “uploads” file from the old server from WP-Content/uploads to the same spot on the new server.
  2. Make sure all the images have uploaded. Sometimes your server will time out, etc. If some of your images are broken and others are not, this may be the reason. Reupload and make sure everything is copied over.
  3. Navigate to the Cpanel on your old server and download a copy of the database. Reupload to the new server. Sometimes, simply uploading the database fixes the issue with the old photos not showing.

If the steps above do not work, install one of the search and replace plugins. Just about any of them will work, but most are rated between one to five stars with five being the highest. This tells you what others thought about a particular plugin. Once that plugin is installed and you are certain all images have been uploaded, run the program and it will search and replace any broken images.

Finally, take the time to click through each page. Even though the above steps may have solved your problem, it is possible one or two images were missed and need to be uploaded again. If you only have one or two broken images, it may even be easier to go ahead and manually upload those to each post instead of going through all the steps again.

Database Corrupted

You’ve migrated your site and everything seems to be running well when suddenly you get that dreaded error stating that your database is corrupted. Unless you have a large amount of programming knowledge under your belt, you may even have a moment of panic or two when this happens.

If you can access your WordPress dashboard, try to first disable all plugins and see if your database pulls up correctly. Then, re-enable them one at a time, checking the home page each time to make sure it is showing correctly.

If you cannot access your dashboard because you get the corruption error, it is a little trickier to fix this issue. Try these different simple steps to see if one works:

  • Reupload your database, writing over the new database.
  • Check where the corruption error is coming from and try to reupload that file from your old site to your new one.
  • Open the file and check to make sure it is pointing to your new server.

If those steps do not work, you may have to do a bit of coding, but I’m going to talk you through it. First, open the new site in FTP and go to your wp-config.php file. The file should be in the main folder where you blog resides.

The first thing you should always do whenever editing your PHP files is to make a copy of what is there. You can copy and paste into Notepad and save on your desktop. This could save you if your files get really corrupted.

Now…

Look for this wording:

/** Absolute path to the WordPress directory. */

Just above that line, add this wording:

define('WP_ALLOW_REPAIR',true);

Save your changes and leave your FTP program open for now. Open up your favorite web browser. Go to this address:

http://yourwebsitename.com/wp-admin/maint/repair.php

class="aligncenter wp-image-10334" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repair.png" alt="repair screen" width="750" height="278" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repair.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repair-300x111.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

I always use “Repair and Optimize” but either button will work to repair your database for you. When the process is completed, you will see a screen that looks the one below. It will even remind you to remove that repair line from your configuration file.

class="aligncenter wp-image-10335" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repaired.png" alt="repaired database" width="750" height="433" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repaired.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repaired-300x173.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

PHPMyAdmin

If the above methods don’t work, your next step is to head over to your database. This can be daunting if you aren’t sure exactly how databases work, but the steps are fairly simple. Even if you completely destroy the database, you should be able to just redownload from the old server and upload again. There really is no need to be afraid as long as you have your database backed up.

  1. Login to your control panel and click on PHPMyAdmin

class="aligncenter wp-image-10336" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/phpmyadmin.png" alt="phpmyadmin" width="750" height="158" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/phpmyadmin.png 887w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/phpmyadmin-300x63.png 300w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/phpmyadmin-750x158.png 750w" sizes="(max-width: 750px) 100vw, 750px" />

 

2. Choose your WordPress database. This typically is titled yoursite_wrdp1. However, this can vary. You will likely see “WP” somewhere in the title, though. I have posted a sample below, but I erased my own info so my database isn’t out there for anyone to see and typed in “yoursite” to give you an idea of where to find your database. You can also find your database name listed in that wp-config.php file that you had open in the step above. Click on the database name in PHPMyAdmin to open it.

class="aligncenter wp-image-10337" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/choose-database.png" alt="choose database" width="750" height="231" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/choose-database.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/choose-database-300x92.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

 

3. Once the database loads, check the button that says “style="color: #444444;" for="tablesForm_checkall">Check Allstyle="color: #444444;"> / style="color: #235a81;" href="https://ssr6.supercp.com:2083/cpsess1374413623/3rdparty/phpMyAdmin/index.php#">Check tables having overhead“.

class="aligncenter wp-image-10338" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/check-all.png" alt="check all" width="750" height="276" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/check-all.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/check-all-300x110.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

4. Choose “Repair Table in the drop down box to the right of where you just checked the box.

class="aligncenter wp-image-10339" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repairtable.png" alt="repair-table" width="750" height="339" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repairtable.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/repairtable-300x135.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

5. You’ll be given a status about whether the tables were repaired and the top of your screen should say “ystyle="color: #000000;">our SQL query has been executed successfully”.

class="aligncenter wp-image-10340" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/successful-repair.png" alt="successful repair" width="750" height="312" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/successful-repair.png 700w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/07/successful-repair-300x124.png 300w" sizes="(max-width: 750px) 100vw, 750px" />

What If Nothing Works?

If you’ve tried the steps above to repair broken images or a database and your site still isn’t working, your only option is to start over. Uninstall WordPress completely and reinstall a fresh copy. Upload your WP-Content folder again, etc.

If that doesn’t fix your issues, contact the tech support experts at your new host. Although they are not obligated to help you with a WordPress issue, they may have additional suggestions or step in and figure out what is going on. My web hosting company has helped me a couple of times and been very insightful about what to do in the future when such situations arise. This is where a web host with excellent customer service pays off.

Running into issues with moving to a new server can be frustrating. Patience, a good sense of humor and taking the time to work through each step can often help you solve minor issues.


Page 12 – Web Hosting Secret Revealed