nháp (5)

# chmod –help
Usage: chmod [OPTION]… MODE[,MODE]… FILE…
or: chmod [OPTION]… OCTAL-MODE FILE…
or: chmod [OPTION]… –reference=RFILE FILE…
Change the mode of each FILE to MODE.
With –reference, change the mode of each FILE to that of RFILE.

-c, –changes like verbose but report only when a change is made
-f, –silent, –quiet suppress most error messages
-v, –verbose output a diagnostic for every file processed
–no-preserve-root do not treat ‘/’ specially (the default)
–preserve-root fail to operate recursively on ‘/’
–reference=RFILE use RFILE’s mode instead of MODE values
-R, –recursive change files and directories recursively
–help display this help and exit
–version output version information and exit

Each MODE is of the form ‘[ugoa]*(-+=)+|[-+=][0-7]+’.

GNU coreutils online help: http://www.gnu.org/software/coreutils/
For complete documentation, run: info coreutils ‘chmod invocation’

default path is /path/to/dir. But if you use ls and cd to access the folder, then you only need to type folder name.

# chmod 755 wp-content


https://docs.presscustomizr.com/article/171-fixing-maximum-upload-and-php-memory-limit-issues

Contact your Hosting Company
Yes, this is the most preferred way. Contact your hosting company and show them a screenshot of your error, or email them the error message. Ask them to assist by increasing the following values, until you are able to install your theme or upload your image. Your hosting company may have restrictions on these values.

memory_limit
upload_max_size
post_max_size
upload_max_filesize
max_execution_time
max_input_time
Preferably to the following values.

memory_limit = 256M
upload_max_size = 64M
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 300
max_input_time = 1000

Editing php.ini File
The php.ini file is the default PHP configuration file. Most of the Shared Hosting Company does not allow access to this file. If you are certain that you have access to php.ini file on your server, you may proceed with the following steps.

Access it using your FTP program. (how to do use a FTP software with WordPress ?)
Backup a copy of this file before attempting to edit it.
Open it and find the following values, one at a time (They are located at different lines within the file)
memory_limit
upload_max_size
post_max_size
upload_max_filesize
max_execution_time
max_input_time

Preferably, edit them to the following values.
memory_limit = 256M
upload_max_size = 64M
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 300
max_input_time = 1000

Using .htaccess file
In WordPress, there is a .htaccess file. WordPress uses this file to manipulate how Apache (server) serves files from its root directory, and subdirectories. Therefore, this file is very important. Do not edit what’s originally written in this file. You can add some directives at the end of the file to increase the PHP Upload Max Filesize. Learn more about the htaccess file in WordPress here.

Use your favorite FTP program to access your WordPress installation.
Go to the root directory, it’s the directory where you can find your wp-config.php file. You should be able to find your .htaccess file.
Download a copy of it onto your computer to save as backup.
Open it and added the following into a newline at the end of the file.
php_value memory_limit 256M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 1000

Save your changes and overwrite the .htaccess file on your server.
Go back to your System Informations and check if your values have changed. If not, you should contact your hosting company for assistance in editing these values in your php.ini file.

Posted in take note.

Leave a Reply

Your email address will not be published. Required fields are marked *