sudo chown -R www-data:www-data wp-content/themes sudo chown -R www-data:www-data wp-content/plugins
chown -R www-data:www-data /var/www/html/wp-content
sudo chown -R www-data:www-data /var/www its worked for me maybe run this code also sudo chmod -R g+rw /var/www
1) Go to your cPanel 2) Open your File Manager 3) Then click on public_html 4) Check for wp_content. Click on it. 5) Once opened, you will see the plugins folder. Make sure it is named ‘plugins’ and nothing else. 6) While doing all that, you can as well check for the permissions and make sure it is 755.
Paste the following line in your wp-config.php if ($_SERVER[’HTTP_X_FORWARDED_PROTO’] == ‘https’) $_SERVER[’HTTPS’]=’on’; but make sure that you do it before the following line require_once(ABSPATH . ‘wp-settings.php’);
chmod 777 wp-content
Add this code in wp-config.php file. define(‘FS_METHOD’, ‘direct’);
Add code within a .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # BEGIN WordPress RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> You need to add this line RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Check if your hosting mod_rewrite is enabled by creating a file phpinfo.php with content.Set the permalink structure Go to Dashboard > Settings > Permalinks and choose “Custom Structure” option and enter in the field: /%postname%/ and click on the Save Changes button. Edit your .htaccess file Copy the following directive into your .htaccess file which is located in the root of your website folder: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$…