Wordpress: Difference between revisions

From Server STB
Jump to navigation Jump to search
No edit summary
No edit summary
Line 26: Line 26:
3. dan jangan lupa  
3. dan jangan lupa  
  +x file.sh
  +x file.sh
4. Atau masih uji coba
#!/bin/bash
for directory in */; do
    chmod 755 -R "${directory%/}/htdocs/wp-content/uploads/"
done

Revision as of 10:03, 16 February 2024

Baerbagai macam konfigurasi wordpress

  • Unutuk mematikan tambah tema dan plugin di wordpress tambahakan script ini
define('DISALLOW_FILE_MODS',true); 

di wp-config.conf

  • Unutuk mematikan edit di wordpress tambahakan script ini
define( 'DISALLOW_FILE_EDIT', true );

di wp-config.conf

<Directory /var/www/html/wp-content/uploads/>
    php_admin_value engine Off
</Directory>
  • hak akses

1. membuat nama folder menjadi text

ls -d */ > file.txt

2. membuat file.sh

#!/bin/bash
while IFS= read -r directory; do
   chmod 777 -R "${directory%/}/htdocs/wp-content/"
done < file.txt

3. dan jangan lupa

+x file.sh

4. Atau masih uji coba

#!/bin/bash
for directory in */; do
   chmod 755 -R "${directory%/}/htdocs/wp-content/uploads/"
done