Home > Article > CMS Tutorial > Why can’t I download the theme after installing WordPress?
Why the theme cannot be downloaded after WordPress is installed
The theme cannot be downloaded after WordPress is installed because of the folder Insufficient permissions.
Solution to the problem that the theme cannot be downloaded after WordPress is installed:
1. Use FTP software to connect to the FTP space, enter the wp-content directory, and create a new tmp file folder, set the permissions of the folder to 777
2. Download: Return to the root directory of the website in FTP, find the PHP file wp-config.php, and download it to the local
3. Modify: Add the following three lines of code to wp-config.php:
[Use Notepad editor, recommended: Notepad++]
define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');/* WordPress的临时目录。*/ define("FS_METHOD", "direct"); define("FS_CHMOD_DIR", 0777); define("FS_CHMOD_FILE", 0777);
Note: After defining ABSPATH, that is, after it Add
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); ================================
at the end and the final code should be:
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp'); define("FS_METHOD", "direct"); define("FS_CHMOD_DIR", 0777); define("FS_CHMOD_FILE", 0777);
4. Upload: Upload and overwrite the wp-config.php file
5. Set the wp-content directory The plugins and themes folder permissions are 777.
At this point, your plug-ins and themes can be updated automatically.
This is the ultimate solution, the others are castrated versions.
For the sake of security, the tmp, themes, and plugin folders with read and write permissions of 777 should be set to have no execution permission in .htaccess.
● Pay attention to the order of operations, first create tmp, then set the permission to 777, and then modify the wp-config.php configuration file
For more WordPress technical articles, please visit WordPress TutorialColumn!
The above is the detailed content of Why can’t I download the theme after installing WordPress?. For more information, please follow other related articles on the PHP Chinese website!