WordPress is a powerful CMS (Content Management System) that allows users to create websites and/or blogs. Much like purchasing a car, you are given options to enhance the base functionality. However, depending on specific server configuration, you may or may not be prompted to enter in your FTP (File Transfer Protocol) credentials when installing a new plugin or theme.
Let’s get started
From the administrative interface of WHM/cPanel®, let’s quickly explore the “Service Configuration” section. In this section, we’ll take a look at “Configure PHP and suEXEC”. As mentioned, “this tool allows you to configure the Apache PHP Handler, the default PHP version and suEXEC support”. The options on this page are beyond the scope of this article but for the sake of using WordPress to remove the FTP requirements in cPanel®, we will use the suPHP configuration.
A little explanation, please?
What makes this important? Well, WordPress is asking us for the FTP credentials when attempting to install a plugin directly from the administrative section. Having suPHP selected requires that all file and folders inside the public_html document be controlled by the account’s name. WordPress is no longer running from the group “nobody” and because of this, we no longer need to enter in the FTP credentials. But, there is something else to discuss.
Under suPHP, files and directories must be set to 0644 (files) and 0755 (directories). If you currently manage your own VPS, it is possible you may encounter an internal 500 error when visiting sites on your server. This most likely is the result of permissions not being set properly. Using a bash script from the command line can quickly resolve this issue. Do some research for ‘Switching to suPHP’ if this applies to you.
Whether you are a seasoned or new system administrator, you’ve probably have hardened your VPS to the best of your ability through research, guidelines and experience. Under “Service Configuration”, we’ll review “PHP Configuration Editor”. Clicking on the “Advanced Mode” radio button will give us more control. Do a search from your browser for “disable_function”. Once again, the values are outside the scope of this article. However, please carefully review your settings. If you happen to find “getmyuid, getmypid, set_time_limit, pclose“, you will continue to have issues with WordPress asking for the FTP credentials. Do some research of those functions before making a decision about removing them.
Quick steps with access to WHM/cPanel for removing FTP requirements in WordPress:
- Enable suPHP
- Remove disabled functions “getmyuid, getmypid, set_time_limit, pclose“