How to Fix No input file specified in WordPress

The No input file specified WordPress error is usually encountered when you migrate a website, and then this error can occur when installing WordPress on a new server.

Generally, this error happens because the PHP version on your old server is not the same as the PHP version on your new server, an error in your .htaccess file, or file permissions that are incorrect. To fix it, you can use several methods, including updating the PHP version or using the default WordPress .htaccess file.

How to Fix No input file specified in WordPress

1. Update PHP Version

Cara Mengatasi No input file specified WordPress - 1

The first method you can try is to update your PHP version. The most stable PHP version that can be used for WordPress right now is version 7.4.

Why not use PHP version 8.0 or newer?

As stated on the page PHP Compatibility and WordPress Versions, currently PHP 8.0 and above are still in Beta Support, so some files or plugins may not run as expected.

Meanwhile, if you use PHP 7.3 or lower, you will get a message on the WordPress Site Health page because that PHP version is obsolete. Therefore, it is recommended to use PHP version 7.4 only.

If you use cPanel on the hosting you use to install WordPress, you can update the PHP version by following these steps: How to Change PHP Version in cPanel

2. Use Default WordPress .htaccess

What is .htaccess? .htaccess stands for Hypertext Access, where this file is used for configuration on Apache-based web servers.

This .htaccess file can be used to tell the server how it should process things when a website is accessed later. The file usually only contains a few lines of code by default, or you can add other lines of code to customize it for the website or script you are using.

Htaccess is short forHypertext Access. It is a configuration file used by apache-based web servers.

Configuration files configure the initial settings of a program, or in this case the server. This means that the .htaccess file can be used to make the server behave in a certain way. Each function is basically just a line of text, or code, which tells the server what to do. You can add or change functionality by adding or changing the code in the .htaccess file.

To change the WordPress .htaccess file, you can follow the steps on this page: How to Edit WordPress .htaccess.

Next, in your .htaccess file, change all existing content to the following lines of code or commands:

# BEGIN WordPress
RewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]
# END WordPress

3. Change File Permissions

If the two previous methods have not worked, you can try to re-verify that all your files and folders have the appropriate access rights.

Here is a list of permissions you can use for WordPress installation files and folders

  • File: 0644 / 644 / -rw-r–r– / 0640 / 640 / -rw-r—–,
  • Folder: 0755 / 755 / -rwxr-xr-x
  • wp-config.php file: 440 / -r–r—– / 400 / -r——–
  • Make sure there are no files or folders with permissions: 0777 / 777 / -rwxrwxrwx

If you use cPanel, you can follow these steps to change file or folder permissions:

  1. Log in to your cPanel, then open File Manager
    Cara Mengatasi No input file specified WordPress 3-1
  2. Open your WordPress installation folder, right-click on the file whose permissions you want to change, and select the option Change Permissionss
    Cara Mengatasi No input file specified WordPress 3-2
  3. Change the permissions according to the previous list, then save by clicking the button Change Permissionss
    Cara Mengatasi No input file specified WordPress 3-3
  4. Done

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...