Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    WordPress Breaks After Changing Permalinks (403 Forbidden Error)

    WordPress (Developer)
    3
    6
    312
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • johnsonsebire
      johnsonsebire last edited by

      My WP Instance works fine with the permalinks set to Plain i.e. https://dmtvstream.com/?p=123. However, when this is changed it cases pages to be inaccessible. I want the url structure to be https://dmtvstream.com/sample-post. When I set the permalinks to post name it breaks access to my Radio page which should be accessible at https://dmtvstream.com/radio with a 403 Error page.

      The Image below is a snapshot of the error:

      c0d487c8-98a1-4e6b-b18e-866c97347d85-image.png

      The same page is accessible here: https://dmtvstream.com/?page_id=350 when the permalinks are set to Plain.

      See image below:

      7648df89-4554-4168-8603-0f728bdfdd05-image.png

      What can I do to resolve this! We're launching this project in the next couple of hours!

      nebulon girish 2 Replies Last reply Reply Quote 0
      • nebulon
        nebulon Staff @johnsonsebire last edited by

        @johnsonsebire I am no wordpress expert, but it sounds a bit like you need some rewrite rules in the .htaccess file or so?

        johnsonsebire 1 Reply Last reply Reply Quote 1
        • johnsonsebire
          johnsonsebire @nebulon last edited by

          @nebulon I'm mostly able to resolve such problems but with Cloudron it looks like a nightmare. I tried updating .htaccess but didn't help much. It doesn't appear apache2 is running alongside Cloudron (not sure). If I could figure out how to update the configuration that would be a great help else I may have to reinstall the OS with a more favorable panel. It's my first time using Cloudron on my server.

          nebulon 1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff @johnsonsebire last edited by nebulon

            @johnsonsebire ah I guess you are looking around the root system. On Cloudron all apps are inside a sandboxed container (docker in this case) So the apache is running inside your wordpress instance container. You can use the webterminal into the app or the filemanager (you find both in the app configuration in your Cloudron dashboard) to get access to that specific instance.

            Edit for reference: https://docs.cloudron.io/apps/#web-terminal

            1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @johnsonsebire last edited by

              @johnsonsebire Can you tell me how to reproduce this, since it works just fine for me. Here's what I did:

              • Install WordPress (developer). Can you confirm if you installed the Developer edition? Note that there are 2 WP in Cloudron.

              • I changed the permalink structure in WP settings:

              ef5af5b3-9f13-4725-ab3b-9840d73efe91-image.png

              • I can access the articles like https://wp.cloudron.space/hello-world/
                fe2c244e-6d56-493e-adf6-3f40ab4661eb-image.png

              Can you tell us a bit more about your setup? Did you migrate an existing site or import from some other place?

              1 Reply Last reply Reply Quote 1
              • girish
                girish Staff last edited by

                The file /app/data/public/.htaccess will automatically be updated with the below when the permalink structure is changed. If you imported from another install, can you please check if your htaccess has this? You can check this file using the file manager

                
                # BEGIN WordPress
                # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
                # dynamically generated, and should only be modified via WordPress filters.
                # Any changes to the directives between these markers will be overwritten.
                <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
                RewriteBase /
                RewriteRule ^index\.php$ - [L]
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule . /index.php [L]
                </IfModule>
                
                # END WordPress
                

                334cb414-c5d1-4ee4-9bf9-9c886dd2e293-image.png

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post
                Powered by NodeBB