Want to subscribe to topics you're interested in?
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

    52
    15
    8
    Jul 30, 2014
    Ratings:
    +22
    Local Time:
    7:35 AM
    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

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    5:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    52
    15
    8
    Jul 30, 2014
    Ratings:
    +22
    Local Time:
    7:35 AM
    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

    52
    15
    8
    Jul 30, 2014
    Ratings:
    +22
    Local Time:
    7:35 AM
    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

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    5:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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