Tag - Fix

How To Fix “The Link You Followed Has Expired” Error in WordPress


Are you seeing ‘The link you followed has expired’ error in WordPress?

This error does not give much clues about what’s actually wrong, which is why beginners find it a bit difficult to resolve.

In this article, we will show you how to easily fix ‘the link you have followed has expired’ error in WordPress. We will also talk about what causes this error and how to avoid it in the future.

Fixing 'The link you have followed has expired' error

What Causes The Link You Have Followed Has Expired Error?

This error usually occurs when you are trying to upload a WordPress theme or a plugin to your website from the WordPress admin area.

The link you followed has expired error displayed on a WordPress website

WordPress hosting companies have a setting which controls the size of files you can upload from inside the WordPress admin area. They also have a setting which stops scripts from running too long.

You can see the file size upload limit by visiting Media » Add New page.

WordPress file upload limit

These restrictions make your website safer and improves the overall performance of your WordPress hosting server.

If these settings are too low, or you are trying to upload a larger file, then you would see errors like memory exhausted error or maximum execution time exceeded error.

However, if you are trying to upload a WordPress theme or plugin, then you would see ‘The link you followed has expired’ error.

That being said, let’s take a look at how to easily fix this problem.

Fixing ‘The Link You Have Followed Has Expired’ Error

The quickest way to fix ‘The link you followed has expired’ error is by increasing the file upload size, PHP memory, and execution time limits for your website.

There are multiple ways to do that. We will show you all of them, and you can choose the one that looks easier or the one that works on your hosting environment.

Method 1. Increasing limits in functions.php file

This method is easier, but it has a downside. Your site will return back to the old limits if you change WordPress theme. If you are planning on changing your theme, then try one of the other two methods described below.

Simply add the following code to your WordPress theme’s functions.php file.


@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );

You can increase the values in upload_max_size and post_max_size to be more than the file you are trying to upload.

You will also need to increase the max_execution_time to the time you think it would take for the file to upload. If you are unsure, then you can try doubling this value.

Method 2. Fix by increasing limits in .htaccess file

If you don’t want to add code to your theme’s functions file, then you can try the .htaccess method.

For this method, you will need to edit the .htaccess file by using an FTP client or the File Manager app in cPanel.

Simply connect to your website using FTP and edit the .htaccess file.

Editing the .htaccess file using FTP

Now, you need to add the following code at the bottom of your .htaccess file.


php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

Don’t forget to save your changes and upload the file back to your website.

Method 3. Fix by increasing limits in php.ini file

The php.ini file is a configuration file used by PHP and WordPress. You’ need to connect to your WordPress site using an FTP client and look for php.ini file in your site’s root folder.

Most users are on a shared hosting account, so they may not find it in their site’s root folder. In that case, you need to create a blank php.ini file using a plain text editor like Notepad and upload it to your website.

Now edit the php.ini file and add the following code inside it.


upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Don’t forget to save your changes and upload the file back to your website.

You can now visit your website and try to upload the theme or plugin file. The error would disappear, and you should be able to upload the file.

If it doesn’t, then try to increase file limits to match the file size you are trying to upload.

We hope this article helped you easily fix ‘The link you followed has expired’ error in WordPress. You may also want to bookmark our guide on how to fix the most common WordPress errors. It will help you save a lot of time by quickly finding a fix for WordPress issues.

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.



Source link

How To Fix “Failed To Load Resource” Error In WordPress


Are you seeing “Failed to load resource error” in WordPress or your browser’s inspect tool?

Many WordPress users find it difficult to figure out what resource or file is not loading, and more importantly why is it not loading correctly.

This file can be anything like an image, other media, JavaScript, or a CSS stylesheet. A missing resource can cause your website to misbehave or not function properly.

In this article, we will show you how to easily troubleshoot and fix the “Failed to Load Resource” error in WordPress.

Fixing the failed to load resource error in WordPress

Why Failed to Load Resource Error Occurs?

Failed to load resource error occurs when WordPress is unable to load a file that it is supposed to load.

Basically when WordPress generates a page, it includes several files in the code such as images, scripts, stylesheets, and more. During the page load, these files are loaded by user’s browser.

For more details, see our guide on how WordPress works behind the scenes.

If the browser is unable to load a specific file, then it would go on to display the page without that file. Further, the browser will add a notice in the error console for debugging purposes.

In most cases, you would see this error in your browser’s error console when using the Inspect tool.

Failed to load resource error

This resource could be any file like an image, JavaScript, CSS stylesheet, etc. The error may have different helpful messages next to them.

Below are few examples:

  • Failed to load resource net::ERR_CONNECTION_REFUSED
  • Failed to load resource: the server responded with a status of 404 (Not Found)
  • Failed to load resource: the server responded with a status of 500 (Internal Server Error)
  • Failed to load resource: net::err_name_not_resolved

Even if a specific file didn’t load, the rest of your web page will continue to load. It just may not look or behave as expected. This is why you need to fix the error to avoid any unexpected issues.

That being said, let’s see how to easily fix the failed to load resource error in WordPress.

Fixing Failed to Load Resource Error in WordPress

As we mentioned earlier, the error is caused when your website’s code mentions a file but the browser is unable to download it.

This could happen for a number of reasons. We will try to look at and eliminate them one by one.

Replace The Missing Resource

First, let’s start with the most common solution. Make sure that the failed resource actually exists.

If the missing resource is an image in one of your blog posts or page, then try to look for it in the media library.

Replace missing image

If you can see it in the media library, then try to add it again by editing the post or page. If you cannot see the file in the media library, then try uploading it again.

In some cases, you may see broken images or empty boxes in the media library instead of images. In that case, you may need to fix the file permissions. For detailed instructions, see our tutorial on how to fix image upload issues in WordPress.

Replace theme or plugin files

If the failed resource is a WordPress plugin or theme file, then the easiest way to replace it is by reinstalling the plugin or theme.

First, you need to deactivate your current WordPress theme. You can do that by visiting Appearance » Themes page.

Deactivate a WordPress theme

If you have another theme installed on your website, then you can just go ahead and activate that. This will deactivate your current theme. In case you don’t have any other theme installed, then you need to install a default theme.

Once you activate the other theme, you can visit your website to see the error has been resolved.

If the missing resource is a WordPress plugin file, then you will need to reinstall the plugin. For more details, see our step by step guide on how to install a WordPress plugin.

You can also use FTP to connect to your WordPress hosting account and manually replace a specific file. For more details, see our guide on how to use FTP.

Fixing the WordPress URL to Avoid Failed Resource Error

The most common reason that cause the failed resource error is incorrect WordPress URL settings.

Simply head over to Settings » General page and look for WordPress Address and Site Address options.

WordPress URL settings

You need to make sure that both URL are correct. You need to have the same URLs for both options.

Keep in mind that WordPress treats www and non-www URLs as two different addresses. If you have SSL enabled on your website, then your URLs should begin with https instead of http.

Don’t forget to click on the Save changes button to store your settings.

You can now visit your website to see if the error has been resolved.

If the error still persists, then you need to follow our complete WordPress troubleshooting guide. It will help you find out what’s causing the issue and how to fix it.

We hope this article helped you learn how to easily fix the “Failed to load resource” error in WordPress. You may also want to bookmark our ultimate guide on fixing the most common WordPress errors.

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 How To Fix “Failed To Load Resource” Error In WordPress appeared first on WPBeginner.



Source link

How to Fix the WordPress White Screen of Death (Step by Step)


The WordPress white screen of death is one of the most common WordPress errors. It is also one of the most frustrating ones because there is no error message, and you are locked out of WordPress.

Another problem with the white screen of death error is that sometimes it only affects a certain part of your website.

For example, you may only see the white screen of death inside the WordPress admin area, while everything else works fine. In other cases, you may only see it on a specific post whereas everything else works fine.

In this article, we will show you how to fix the WordPress white screen of death by looking at different solutions.

Fixing WordPress white screen of death error

Note: Before you make any changes to your site, make sure you have a backup of your WordPress site. If you don’t have access to the admin area, then see our guide on how to manually create WordPress database backup.

Why Do You See the White Screen of Death in WordPress?

Majority of the time when you see a white screen of death, it means that a script on your website exhausted the memory limit.

The unresponsive script either gets killed by your WordPress hosting server, or it simply times out. This is why no actual error message is generated, and you see a plain white screen.

WordPress showing white screen instead of website

This error can also happen due to a poorly coded theme or plugin installed on your site. Sometimes it can happen if there is an issue with your web hosting server.

Since the white screen error can be caused by any number of things, it requires methodical troubleshooting to fix.

Does the problem occur on your other sites?

If you have other WordPress sites installed on the same hosting account, then you want to start by checking if the problem is occurring on other sites as well.

If it is, then that’s a strong indicator that something is wrong with your WordPress hosting service. This could be a temporary issue affecting their service, and you need to reach out to their support for more help.

On the other hand, if the issue is only happening with one website or a specific part of that site, then you know that the problem is with that particular website.

Fixing White Screen Error with WordPress Recovery Mode

If the white screen of death error is caused by a WordPress plugin or theme, then WordPress may be able to catch it.

The new fatal error protection feature introduced in WordPress 5.2 can sometimes catch the error, so you may not even see a white screen. Instead, you will see a message that the site is having technical difficulties.

Technical difficulties

You would also receive an email message on your admin email address with the subject ‘Your Site is Having a Technical Issue’.

Technical issue email sent to admin

This email message will point out the plugin causing the error, and it will also contain a special link. This link will allow you to login to the WordPress recovery mode and deactivate the faulty plugin.

WordPress recovery mode

However, if you are seeing the plain white screen of death with no email or recovery mode option, then you need to manually fix the error.

Increasing the Memory Limit

Usually, this error happens because a script has exhausted the memory and quit in the middle. To fix this, you need to increase PHP memory available to WordPress. This will allow the script to use more memory to finish the job it was supposed to do.

You can follow the instructions in our tutorial on how to increase PHP memory in WordPress.

Disabling All Plugins

If increasing the memory limit did not help, or if you have a high memory limit like 256M or 512M, then you need to start troubleshooting.

In our experience of troubleshooting this issue, we have always found that the issue is either with a specific plugin or a theme. Let’s go ahead and disable all the plugins.

If you can still access the WordPress admin area, then you can simply go to Plugins » Installed Plugins page. Select all the installed plugins and then select ‘Deactivate’ under ‘Bulk Actions’ drop-down.

Deactivate all plugins via WordPress admin area

However, if you don’t have access to the WordPress admin area, then you will need to deactivate all plugins via FTP.

First, connect to your WordPress site using an FTP client. Once connected, go to the wp-content folder where you will see the ‘plugins’ folder.

Rename plugins folder to deactivate all plugins

Now, you need to right-click on the plugins folder and then select rename. You can rename the plugins folder to plugins-deactivated.

Plugins deactivated

Your FTP client will now rename the plugins folder.

WordPress looks for a folder named plugins to load all plugins. When it cannot find the folder, it simply deactivates all plugins.

If this fixes the issue, then enable one plugin at a time to get to the bottom of the issue. Once you find the plugin causing the issue, you can replace it with an alternative or report the issue to plugin authors.

Replace Theme with a Default Theme

If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default theme.

First, connect to your website using an FTP client and go to the /wp-content/themes/ folder. It contains all installed themes on your website.

Right-click to select your current WordPress theme and download it to your computer as a backup.

Download current theme as backup

Next, you need to delete your current theme from your website. Right-click on your theme folder and select ‘Delete’. Your FTP client will now delete the theme from your website.

Delete current theme

Now if you have a default WordPress theme like (Twenty Eighteen or Twenty Nineteen) installed on your website, then WordPress will automatically start using it as the default theme.

However, if you don’t have a default theme installed, then you need to manually install it using FTP.

If this fixes the issue, then you should look at your theme’s functions.php file. If there are extra spaces at the bottom of the file, then you need to remove those, and sometimes that fixes the issue.

If you are using a poorly coded function in your theme’s functions.php file, then it can cause the white screen of death error as well.

Consider downloading a fresh copy of your theme from its source and then install it.

Enable Debug Mode to Catch Errors in WordPress

If nothing has helped so far, then the next step is to turn on debugging in WordPress. This will allow you to see what type of errors are being outputted.

Simply, add the following code into your wp-config.php file.

define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

Once you add this, the blank screen will now have errors, warnings, and notices. These may be able to help you determine the root cause.

If you don’t see any errors, you may still want to check the debug log. Simply visit the wp-content folder on your website using an FTP client. There you will find a new debug.log file containing a log of all errors, notices, and warnings.

Debug log

Clear WordPress Cache

Sometimes, you may have access to the backend, but the front-end of the site has the white screen of death. This can happen because of a caching plugin. Simply empty your cache.

See our guide on how to clear cache in WordPress for detailed instructions.

Fixing Longer Articles

If you have a white screen of death only on a very long post or page, then this little trick might work.

This trick basically increases PHP’s text processing capability by increasing the recursion and backtrack limit. You can paste the following code in your wp-config.php file.

/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);

We understand that this is a very frustrating error, and we hope that one of the tricks above fixed the issue for you. You may also want to see our WordPress troubleshooting guide which teaches the steps you should take to catch and fix WordPress problems by yourself.

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 How to Fix the WordPress White Screen of Death (Step by Step) appeared first on WPBeginner.



Source link

How to Fix Image Upload Issue in WordPress (Step by Step)


Are you facing image upload issues on your WordPress website? For most beginners, image upload errors can be quite confusing because they can appear without you doing anything different.

Failure to upload images is one of the most common image issues in WordPress. Luckily, it is quite easy to fix, and you can do it yourself.

In this article, we will show you how to easily fix the image upload issue in WordPress. We will also explain what causes this issue, and how you can prevent it in the future.

Fixing image upload issues in WordPress

What Causes The Image Upload Issue in WordPress

The image upload issue in WordPress is typically caused by incorrect file permissions. Your WordPress files are stored on your web hosting server and need specific file and directory permissions to work.

Wrong file permissions prevent WordPress from reading or uploading file on the hosting server. You may get the following error when uploading image file:

‘Unable to create directory wp-content/uploads/2019/04. Is its parent directory writable by the server?’

Unable to create directory error

Another sign of this issue is that your images may disappear from the media library.

Missing images in media library

My site was working fine before? Who changed the file permissions?

This could happen due to a number of reasons. A misconfiguration on your shared hosting server can sometimes change those permissions without you doing anything.

For example, your web hosting provider ran an upgrade which unexpectedly changed file permissions.

If everything else is working fine on your website, then you can simply apply the correct file permissions to fix the image upload issue.

That being said, let’s take a look at how to set correct file permissions to fix image upload issues in WordPress.

Fixing Image Upload Issue in WordPress

You will need to use an FTP client to change file permissions.

First, connect to your website via FTP and then go to /wp-content/ folder. Inside, you’ll find the uploads folder, which is where WordPress stores all your media uploads including images.

Now right click on the uploads directory and then select File Permissions.

Opening file permissions dialog box for uploads folder

This will bring up the file permissions dialog box.

First, you will need to set file permissions for the uploads directory and all the subdirectories inside it to 744.

Change folder permissions

To do that, enter 744 in the numeric value box, and then check the box next to Recurse into subdirectories option. Now click on the ‘Apply to directories only’ radio button.

Click on the OK button to apply these changes. Your FTP client will now start applying file permissions to the directories.

Note: If setting directory permissions to 744 does not seem to solve your problem, then try 755.

In the next step, you will need to set file permissions for all the files in the uploads directory.

To do that, right click on uploads directory and select file permissions. In the file permissions dialog box, change the numeric value to 644.

Check the box next to Recurse into subdirectories. Lastly, you need to click on ‘Apply to files only’ radio button. Click on the OK button to apply these changes.

File permissions

The FTP client will now change the permissions for all files inside the uploads folder. Once it is done, you can go back to your WordPress admin area and try uploading images again.

Note: if you don’t know how to use a FTP client, then you can also use the file manager provided by your WordPress hosting company. Since the screenshots will vary from each host, you will need to talk to their support to find instructions.

We hope this article helped you fix the image upload issue in WordPress. You may also want to see our article on how to optimize image SEO to get more organic traffic to your website.

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 How to Fix Image Upload Issue in WordPress (Step by Step) appeared first on WPBeginner.



Source link

How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress


Are you seeing the ‘Briefly unavailable for scheduled maintenance’ error in WordPress? This error usually appears while updating WordPress core, plugins, or themes.

Basically, your WordPress site fails to finish the update which leaves you stuck in the maintenance mode.

In this article, we will show you how to easily fix the “Briefly unavailable for scheduled maintenance” error in WordPress. We will also show you why this error occurs and how you can avoid it in the future.

Fixing unavailable for scheduled maintenance error in WordPress

Why Does The WordPress Maintenance Mode Error Occur?

Maintenance mode page is technically not an error. It is a notification page.

During the update process, WordPress downloads necessary update files to your server, extract them and then install the update.

WordPress also puts your site on maintenance mode and displays the “Briefly unavailable for scheduled maintenance. Check back in a minute.” notice during the process.

Unavailable for scheduled maintenance error in WordPress

To trigger the maintenance mode notification, WordPress creates a temporary .maintenance file in your website’s root folder.

If everything works normally, then this notice will probably be displayed for only a few seconds. After the successful update, WordPress will automatically delete the maintenance file to disable maintenance mode.

However, sometimes due to a slow WordPress hosting server response or low memory issue, the update script will timeout thus interrupting the process. When this happens, WordPress does not get a chance to take your site out of maintenance mode.

In other words, your site will continue showing the maintenance mode notice, and you will need to manually fix it.

How to Fix WordPress Maintenance Mode Error?

To get your website out of maintenance mode, all you really need to do is delete the .maintenance file from your site’s root folder using FTP.

Delete maintenance file

If you can’t find the .maintenance file in your WordPress root directory, then make sure you checked your FTP client to show hidden files.

In Filezilla, you can force it to show hidden files by clicking on Server » Force showing hidden files from the menu bar.

Show hidden files in FTP

Once the .maintenance file is removed, your site will come out of maintenance mode, and the error should be fixed.

If you don’t know how to use FTP, then you can also remove the files by going to the file manager in your WordPress hosting control panel, and then deleting the .maintenance file inside the file manager.

How to Avoid WordPress Maintenance Mode in the Future?

We already know that the “Briefly unavailable for scheduled maintenance” error is caused by slow server response or low memory issue on your web hosting server.

The easiest way to avoid this error is by upgrading to a higher hosting plan. We recommend going with one of these managed WordPress hosting companies that offer superior hosting performance.

If upgrading to a higher hosting plan is not an option, then we recommend doing plugin and theme updates one at a time.

Often users have a tendency of quickly clicking on the update link underneath each plugin. WordPress then staggers the update order, but even a millisecond of delay in connection could cause a conflict leading your site to be stuck in maintenance mode.

WordPress Plugin Update One at a Time

Instead of quickly clicking on the Update link, we recommend patiently updating one plugin at a time.

How to Customize Maintenance Mode Notification

An easier solution to avoid showing the default maintenance mode notification is by manually putting your WordPress site on maintenance mode before installing any updates.

The best way to do this is by installing and activating the SeedProd plugin. It is the most popular maintenance mode plugin for WordPress. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to Settings » Coming Soon Pro page and check the box next to ‘Enable maintenance mode’ option.

Enable maintenance mode

After that, you need to click on ‘Edit Coming Soon/Maintenance Page’ button. This will open the SeedProd theme customizer. From here you can choose a theme and then customize it to create a beautiful maintenance mode page for your website.

Select a theme for your maintenance mode page

Now, if you don’t want to manually put your website in maintenance mode every time you update, then you can create a maintenance page in WordPress without using a plugin.

Simply create a new file called maintenance.php on your desktop and paste this code inside it:

<?php
$protocol = $_SERVER["SERVER_PROTOCOL"];
if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
    $protocol = 'HTTP/1.0';
header( "$protocol 503 Service Unavailable", true, 503 );
header( 'Content-Type: text/html; charset=utf-8' );
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <h1>We are updating the site, please check back in 30 minutes.</h1>
</body>
</html>
<?php die(); ?>

Next, you need to upload this file to your WordPress site’s wp-content directory.

Now whenever you are updating your website, WordPress will show this page during the maintenance mode. You can use CSS to style this page anyway you want.

Custom maintenance mode notification

Troubleshooting WordPress Maintenance Mode Error

Since we have helped thousands of users fix the “Briefly unavailable for scheduled maintenance” error in WordPress, we have helped users solve several unseen issues that can come up.

Below are some additional steps you might have to take if the above solution does not work.

WordPress still stuck in maintenance mode after the update and fix above?

If this is the case, then you need to update the wp-activate.php file located in your main WordPress folder. This is the same place where you found and deleted the .maintenance file.

You will need to either open the file using your hosting company’s file manager or download it on your computer using FTP.

Next, you need to find the code: define ('WP_INSTALLING', true) and change the true to false.

So your code will look like this:

define ('WP_INSTALLING', false)

After that you need to save the changes and upload the file to your hosting server using FTP. If you’re using the hosting company’s file manager, then simply saving the file should get you out of maintenance mode.

My site is broken after I fixed the WordPress maintenance mode error. How do I fix it?

An unfinished or interrupted update may cause issues when your site comes out of maintenance mode.

If this error occurred when you were updating WordPress core software, then you will need to follow our guide to manually update WordPress using FTP.

If the error occurred when you were updating a WordPress plugin, then you will need to temporarily deactivate all WordPress plugins using FTP. This step will ensure that the corrupt plugin is disabled, and your website will come back.

Next, you will need to login to your WordPress dashboard and activate one plugin at a time, to see which plugin caused the issue. After that you need to manually install the plugin update, so it’s working properly.

We hope this article helped you fix ‘Briefly unavailable for scheduled maintenance’ error in WordPress. You may also want to bookmark our ultimate guide on fixing the most common WordPress errors.

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 How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress appeared first on WPBeginner.



Source link

How to Fix “Are You Sure You Want to Do This” Error in WordPress


Every once in a while, you might encounter a WordPress error like error establishing database connection or memory exhausted error. These errors are somewhat helpful because they tell you exactly what the problem is.

On the other hand, there are unhelpful errors like “Are you sure you want to do this”.

There are too many factors that can lead to this error. This is why WordPress is unable to provide any information to point you in the right direction to fix it.

In this article, we will show you how to investigate and fix “Are you sure you want to do this” error in WordPress.

Error - Are you sure you want to do this

What causes the: “Are you sure you want to do this?” error?

‘Are you sure you want to do this?’ error usually appears when nonce verification fails and the most likely candidates to cause this error are plugins and themes not using this feature properly.

Nonces are unique keys which add a security layer to protect WordPress URLs, forms, and ajax calls from abuse. They ensure that a script is originating from your website and not an external source like a hacker trying to gain access to your website.

How to Fix “Are Your Sure You Want to Do This?” Error

Most commonly, this error is caused by a plugin or theme that is installed on your site. To investigate which plugin or theme is causing the issue, you will need to deactivate all your plugins.

Investigating Plugins

First, you need to deactivate all WordPress plugins and make sure that WordPress is unable to locate any installed plugin.

Simply connect to your WordPress hosting account using an FTP client.

Once connected, go to the wp-content folder and rename plugins folder to plugins.deactivated.

Rename plugins folder to deactivate all plugins

After that, you need to go back to the plugins page in your WordPress admin area. You will see a notification for all your plugins which are now deactivated.

Plugins deactivated in WordPress
Now that all your plugins are properly uninstalled and deactivated, you can try to reproduce the error.

If the error does not appear again, then this means that one of the plugins on your website was causing the issue. To figure out which plugin was causing the issue, go back to your FTP client and rename plugins.deactivated folder back to plugins.

After that, visit the plugins page in your WordPress admin area and activate each plugin one by one. You need to try to reproduce the error after activating each plugin until you find the plugin that is causing the issue.

Yes, this sounds like a time consuming task, but it is the easiest way for beginners to find a misbehaving WordPress plugin.

Investigating Themes

If the plugins were not causing this issue, then it might be your theme that is causing the ‘Are you sure you want to do this’ error.

You can investigate the theme causing this issue by repeating the same procedure you did for plugins. First, you need to connect to your website using an FTP client and download your currently active theme to your computer as a backup.

Once you have backed up your theme, you can safely delete it from your web server.

Now visit Appearance » Themes page in your WordPress admin area, and you will see a notification: ‘The active theme is broken. Reverting to the default theme’.

Theme deactivated

WordPress will now start using the default theme like Twenty Seventeen for your website.

If you are unable to reproduce the error after the default theme was activated, then this means that your theme was causing ‘Are you sure you want to do this?’ error.

Unable to Find The Source of The Error

Make sure that you have tested thoroughly to reproduce this error after deactivating and reactivating your plugins and themes.

If you find out that no plugin or theme on your site is causing the error, then there are a few extra steps you can take.

These steps will basically replace all core WordPress files with fresh copies downloaded from the source.

First, you need to make a complete WordPress backup for your site. This step is important as it will help you easily restore your website in case something goes wrong.

Next, connect to your website using an FTP client and download the ‘wp-config.php’ file to your computer. This file contains your WordPress database settings which you will need later.

Download wp-config.php file to your computer

After that you need to carefully delete all WordPress files from your server except wp-content folder and all its contents.

Delete all WordPress files except wp-content folder

After that, you need to download a fresh copy of WordPress to your computer. You can download it from WordPress.org website as a zip file.

Go ahead and extract the zip file on your computer and upload the files inside the ‘wordpress’ folder to your web server using FTP.

Once you have uploaded all the files, rename the wp-config-sample.php file to wp-config.php.

Now, you need to edit the new wp-config file to enter your WordPress database and table information. You can look at the old wp-config.php file that you downloaded earlier to enter all the information.

See our article on how to edit the wp-config.php file in WordPress for detailed instructions.

You need to add all sections except ‘Authentication Unique Keys and Salts’. Delete all the lines starting with define in this section.

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the @link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         '`+7nTNb<AwtbLA$L-Q7amn;~|wH)ljXv2~TpbP?mLA+M`8H|n1`/Lz-GmAQL4fB');
define('SECURE_AUTH_KEY',  '/gkAjhhJe`iwO)V-p=J<cN_ +6D=E#C7gD]c2w~OJ y}eY^,HWn&-j:a');
define('LOGGED_IN_KEY',    'PtDl2V|01oIXDpq^K,IH-8|rhT +T(ZMpuLq>UD?|W)b3gMfG~g[zr8N6}m%MZ|L');
define('NONCE_KEY',        ']Zj5i*hHlsUWKg2|>YF,X+xpd-_`I[nFmA6ZLw~;EW7g0.s5EaZCAJ=j]./5z^X~');
define('AUTH_SALT',        'e*l:hUsddFIxm1E7y-n#<a0|u- #+SsS@-#$vNz}EY4rY~-x|0_6=Q!TR=MMxUL?');
define('SECURE_AUTH_SALT', 'n]^c9nY>_}3,4)J]S sM6-MI3aB#Qk<Re^j#Lu_|x^*BhO.54aZQTtzJeCo5DWAg');
define('LOGGED_IN_SALT',   'Ba3kd1&J$~~`(|uJ0:v;w+DJ3xW}.B#R9J*r|.+V}*sTuK &8db-Mn+[boHW3{[/');
define('NONCE_SALT',       'nBv-U1qfkCZxS|13%hYdHz*s1^){.KSZWm1A^$`r!d5;EqrH:>1Xx`pwt6?**i');

Now, save and upload your wp-config.php file back to your website.

That’s all, you have successfully refreshed your WordPress installation. You can now go ahead and try to reproduce the error on your website.

Basic Tips for Fixing WordPress Issues

We understand that fixing such issues can be frustrating at times. That’s why we have prepared a handy WordPress troubleshooting guide which shows you how to investigate and fix WordPress problems like a pro.

WordPress is used by millions of people. No matter what problem you come across, it is likely that thousands of other other people have faced it before you and have fixed it.

You can find a solution by simply entering the error in the Google search. For more helpful results, add wpbeginner.com at the end of your search term to find an easy step by step guide to fix it.

You can also bookmark our complete guide to common WordPress errors and how to fix them.

We hope this article helped you fix “Are You Sure You Want to Do This” Error in WordPress. You may also want to see our complete WordPress security guide to protect your website against hacking and malware.

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 How to Fix “Are You Sure You Want to Do This” Error in WordPress appeared first on WPBeginner.



Source link