Introduction:
WordPress gets regular updates to fix problems and keep it working well. But sometimes, even with these updates, people can have issues with their WordPress websites. These issues can make the website disappear and show an annoying error.
One of the most complex parts of fixing these errors is figuring out what's causing them. People often have lots of plugins, which makes it even more confusing to find the real problem.
In this article, we will talk about and solve one of these important WordPress errors called "No input file specified."
This error usually happens when people move their websites from one server to another. Usually, doing the following things will solve the problem.
-> Turn off the problematic plugin
-> Update ".htaccess" file
-> Change the PHP version
-> Set the correct file permissions
1. Turn off the problematic plugin.
Sometimes, when moving a website manually, some backup files might not upload properly to the new server. Or it could be that a recent update to a plugin caused the site to stop working due to code errors.
In such cases, we need to find which plugin is causing the trouble. To do that, we can turn off each plugin one by one and check if that solves the problem. We can turn off plugins even without going into the WordPress dashboard. To do this, we need to access the server's file system and change the name of the plugin's folder.
All the plugin folders are stored in the "wp-content" -> "plugins" directory. To access the file system, we can use an FTP program like Filezilla or the file manager in cPanel.
You can use cPanel's file manager to get to your WordPress installation, where you'll find the "wp-content" directory. Inside it, there's a "plugins" directory that has all the plugin data. Each folder here represents an active plugin. To turn off a plugin, you can change the folder's name.

For example, if you want to turn off the akismet plugin, you can change the "akismet" folder's name to "akismet-disable." After confirming that akismet is not causing the problem, you can change it back to "akismet" to reactivate it.

Note: If you're using FTP, use FileZilla to log in to your server remotely. Usually, hosting services send FTP account details in a welcome email. If you didn't receive them, contact your hosting company for the credentials.

When turning off plugins, it's a good idea to start with caching and firewall plugins. There's a good chance that one of these plugins might be causing issues. If cache plugins are not set up correctly, the website might not load correctly or might not load at all. So, before migrating your website, it's a good practice to turn off the cache plugin to ensure a smoother and successful migration process.
2. Update ".htaccess" file
The ".htaccess" file is a crucial file that helps WordPress work correctly. Sometimes, the "No input file specified" error can happen because the ".htaccess" file is broken.
This file is in the main WordPress folder. Certain plugins, like firewall ones, can make big changes to the ".htaccess" file. After turning off cache and firewall plugins, you should put the ".htaccess" file back to how it was before.

To do this, first, make a copy of the current ".htaccess" file to be safe. Then, put the following content into the ".htaccess" file.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

3. Change the PHP version
Another thing that can make the "WordPress no file input specified" error happen is having the wrong version of PHP. If you moved WordPress to a server that uses an older PHP version, it can cause this error.
If you have Linux-shared hosting, there should be an option to change the PHP version from cPanel.
To change the PHP version from cPanel, follow these steps:
Step 1: Login to cPanel
First, log in to your cPanel account. You should have received your cPanel login credentials from your hosting provider.
Step 2: Locate the "Select PHP Version" Option
Look for the "Software" section in cPanel. The option might also be labeled as "Select PHP Version" or something similar.

Step 3: Choose a PHP Version
Click on the "Select PHP Version" or similar option.
You'll see a list of available PHP versions. Choose the one you want to use for your website. The changes will be saved automatically.

Step 4: Set PHP Extensions and Options (Optional)
Some hosting providers allow you to enable or disable specific PHP extensions and configure PHP options. You can do this by clicking on "Extensions" or "Options."

Step 5: Verify Your Website
After changing the PHP version, it's a good idea to visit your website and make sure it's working correctly. Sometimes, certain plugins or themes may not be compatible with the new PHP version, so you may need to make adjustments or updates.
4. Set the correct file permissions
One reason WordPress can have problems is when the file permissions are not set correctly. Having the wrong file permissions can make the website unstable and unsafe. It's important to check these permissions, even if the website seems to be working fine.
The "No input file specified" error can also occur when WordPress files don't have the right permissions.
For website migration, remember to set the following permissions:
All directories should be owned by a real user account.
Directory permissions should be either 755 or 750.
File permissions (except for wp-config.php) should be 644 or 640.
wp-config.php file permissions should be 440 or 400.
Make sure no file has 777 permissions (for security reasons).

Conclusion:
Usually, if you do the things we mentioned earlier with your WordPress, it will likely solve the problem. If you're reading this before you start moving your website, remember to remove the cache plugin and deactivate all the plugins and themes on your site.
