• Hello,

    I can’t update anything on my WordPress site (Stylings & Stories). When I click “update file” in the editor, custom css, posts, pages, everywhere, a 403 error page pops up and updates cannot be made.

    The error started happening after I tried updating my page.php file to have custom headers for each page.

    This is the code that I used. (I used a modified version of this for my purposes) ::

    <?php
    if ( is_home() ) :
    	get_header( 'home' );
    elseif ( is_404() ) :
    	get_header( '404' );
    else :
    	get_header();
    endif;
    ?>

    Which I got from here ::

    So my page.php file looked like this ::

    <?php
    /**
     * Page Template
     *
     * This is the default page template.  It is used when a more specific template can't be found to display
     * singular views of pages.
     *
     * @package Origin
     * @subpackage Template
     */
    
    if ( is_mini-masterclass() ) :
    	get_header( 'mini-masterclass' );
    else :
    	get_header();
    endif;
    ?>
    
    	<?php do_atomic( 'before_content' ); // origin_before_content ?>
    
    	<div id="content">...

    After I made this update is when everything went wrong. Now this update that I made doesn’t even show in my page.php file.

    Things I have tried ::

    • Re-uploading the original page.php file
    • Switching themes
    • Uninstalling + re-installing my current theme
    • Changing the .htaccess file

    The .htaccess code I used is this ::

    It sounds like you may be hitting a mod_security error.  Add the following to .htaccess:
    
    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    which I got from here ::

    Please help!
    Thank you,
    Stephanie

Viewing 7 replies - 1 through 7 (of 7 total)
  • Remove the code you added to your .htaccess file.

    Thread Starter stephiestylings

    (@stephiestylings)

    Oh, I’ve also tried making sure the permissions are correct.

    Thread Starter stephiestylings

    (@stephiestylings)

    Okay, I’ve removed what I added, but still goes to 403 error.

    What else do you have in your .htaccess file?

    Have you tried switching to the default theme automatically by renaming your current theme’s folder inside wp-content/themes and adding “-old” to the end of the folder name using FTP or whatever file management application your host provides?

    Thread Starter stephiestylings

    (@stephiestylings)

    I just uninstalled it in WordPress.

    in the .htaccess it’s

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress
    RewriteCond %{HTTP_HOST} ^blog\.stylingsandstories\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.blog\.stylingsandstories\.com$
    RewriteRule ^/?$ "http\:\/\/www\.stylingsandstories\.com\/blog" [R=301,L]
    Thread Starter stephiestylings

    (@stephiestylings)

    Still no luck. Any other suggestions?

    Thread Starter stephiestylings

    (@stephiestylings)

    So, I’ve done some testing around my site. What’s happening is I’m able to edit .css files but not .php files. It looks like the php is the only thing this issue is affecting.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I can't update/edit anything. 403 error pops up’ is closed to new replies.