Want more timely Centmin Mod News Updates?
Become a Member

Wordpress 403 Forbidden when uploading theme or plugin

Discussion in 'Blogs & CMS usage' started by Inforit, May 10, 2016.

  1. Inforit

    Inforit Premium Member Premium Member

    42
    12
    8
    Jul 30, 2014
    Ratings:
    +15
    Local Time:
    7:49 PM
    nginx/1.7.3
    MariaDB 5.5
    Hi,
    I just installed new vps with beta branch, and sometimes I can upload themes sometimes I cant and get 403 error.
    Any idea what it could be?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    4:49 AM
    Nginx 1.13.x
    MariaDB 5.5
    do you have block.conf include eneabled in vhost could be theme name or elements of theme have keywords that trigger in block.conf or wpsecure_ include conf file ?

    To troubleshoot Nginx and PHP-FPM issues you'd want to check the domain site's vhost access.log and error.log logs located within directory at /home/nginx/domains/yourdomain.com/logs. You can see a full overview at centminmod.com/configfiles.html

    FAQ item 19 has more info on all Centmin Mod relevant log files locations and how to use tail command to view a sample of the entries.

    Also post the contents of your site's nginx vhost http /usr/local/nginx/conf/conf.d/yourdomain.com.conf and/or /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf in BBCODE CODE tags as outlined at How to use forum BBCODE code tags | Centmin Mod Community
     
  3. Inforit

    Inforit Premium Member Premium Member

    42
    12
    8
    Jul 30, 2014
    Ratings:
    +15
    Local Time:
    7:49 PM
    nginx/1.7.3
    MariaDB 5.5
    Thanks @eva2000 its strange I couldnt see error in log, so deleted and created again and now I can upload, lets see if it lasts.
     
  4. Inforit

    Inforit Premium Member Premium Member

    42
    12
    8
    Jul 30, 2014
    Ratings:
    +15
    Local Time:
    7:49 PM
    nginx/1.7.3
    MariaDB 5.5
    I found the problem, after install I change domain to Domain Name Registration and Web Hosting | Domain.com in general settings, once this is done it doesnt allow any uploads
    images, themes or plugins, all give 403 error, change it back to domain.com and it works.
    Which file controls this?
    Thanks
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    4:49 AM
    Nginx 1.13.x
    MariaDB 5.5
    changing just domain in wp settings isn't enough i suspect, might need to do similar to change subdirectory steps via wp-cli see Wordpress - centmin.sh menu option 22 - How to switch Wordpress to subdirectory | Centmin Mod Community

    Code (Text):
    cd /home/nginx/domains/newdomain1.com/public/
    wp search-replace 'http://newdomain1.com' 'http://www.newdomain1.com' --skip-columns=guid --allow-root
    wp option update home 'http://www.newdomain1.com' --allow-root
    wp option update siteurl 'http://www.newdomain1.com' --allow-root