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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. Debugging WordPress

Debugging WordPress

Scheduled Pinned Locked Moved WordPress (Developer)
10 Posts 3 Posters 1.6k Views 3 Watching
  • 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.
    • J Offline
      J Offline
      JLX89
      wrote on last edited by
      #1

      Hello All!
      I'm fairly certain I'm just missing something -- but I'm having issues debugging WordPress. I'm having an issue with Elementor and need to see any WordPress / PHP errors. I've changed the following in wp-config.php and restarted the app to no avail. The debug log doesn't seem to be created or logging in /wp-content/debug.log.

      define( 'WP_DEBUG', true );
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false);
      

      Any help with this would be greatly appreciated!

      Thank you!

      murgeroM 1 Reply Last reply
      0
      • J JLX89

        Hello All!
        I'm fairly certain I'm just missing something -- but I'm having issues debugging WordPress. I'm having an issue with Elementor and need to see any WordPress / PHP errors. I've changed the following in wp-config.php and restarted the app to no avail. The debug log doesn't seem to be created or logging in /wp-content/debug.log.

        define( 'WP_DEBUG', true );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', false);
        

        Any help with this would be greatly appreciated!

        Thank you!

        murgeroM Offline
        murgeroM Offline
        murgero
        App Dev
        wrote on last edited by
        #2

        @jlx89 Try adding this to the config:

        define( 'WP_DEBUG_LOG','/app/data/output.log' ); This should tell wordpress to output to /app/data/output.log which is outside the web root and also in a writable area of the container. 🙂

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~

        1 Reply Last reply
        3
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #3

          In addition to what @murgero said, you can also put things in /run/debug.log or /tmp/debug.log as well. Note that the files under /tmp are cleaned up automatically periodically, so this can either be a plus or minus depending on your use case.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JLX89
            wrote on last edited by
            #4

            @murgero Thank you! I gave that a shot, but it still doesn't seem to be working. I am using the "WordPress Developer)" app -- but can migrate this over to a LAMP Stack, if needed.

            @girish Thank you! I'll give the /run/debug.log option a shot. I'd like to be able to view them as needed, rather than having it stored in the /tmp/ directory.

            girishG 1 Reply Last reply
            0
            • J JLX89

              @murgero Thank you! I gave that a shot, but it still doesn't seem to be working. I am using the "WordPress Developer)" app -- but can migrate this over to a LAMP Stack, if needed.

              @girish Thank you! I'll give the /run/debug.log option a shot. I'd like to be able to view them as needed, rather than having it stored in the /tmp/ directory.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @jlx89 said in Debugging WordPress:

              I am using the "WordPress Developer)" app -- but can migrate this over to a LAMP Stack, if needed.

              The WP Developer app is essentially the same.

              I quickly tried this out. I blindly put the defines you posted at the end of file and it did not work as well :-). It turns out, this was because in wp-config.php, those constants are already defined. In around lines 75-77:

              define( 'WP_DEBUG', false );
              define( 'WP_DEBUG_LOG', false );
              define( 'WP_DEBUG_DISPLAY', false );
              

              I had to remove those duplicate lines, since I guess PHP does not allow re-defining constants.

              After removing them, I added some junk in headers.php like random_function(); and I see that debug.log is created once I visit WP.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JLX89
                wrote on last edited by
                #6

                @girish Yes, I had originally added them at the bottom of wp-config.php and realized they were already defined and changed the values. I added the following and restarted the app, to no avail. I'll give that another shot and see if that works out.

                girishG 1 Reply Last reply
                0
                • J JLX89

                  @girish Yes, I had originally added them at the bottom of wp-config.php and realized they were already defined and changed the values. I added the following and restarted the app, to no avail. I'll give that another shot and see if that works out.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @jlx89 I noticed the file is not created, unless there is a real error. Did you put some error in a PHP file ? error_log also works.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JLX89
                    wrote on last edited by
                    #8

                    @girish Yes, I did that -- error-log doesn't seem to be created nor is anything logged in /wp-content/debug.log.

                    girishG 1 Reply Last reply
                    0
                    • J JLX89

                      @girish Yes, I did that -- error-log doesn't seem to be created nor is anything logged in /wp-content/debug.log.

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      @jlx89 I setup a test here - https://my.demo.cloudron.io/#/app/cc6803b8-c862-4a2b-8c12-e25c9a092592 . I put a bad func call here - https://my.demo.cloudron.io/filemanager.html?type=app&id=cc6803b8-c862-4a2b-8c12-e25c9a092592#public/wp-includes/functions.php . Maybe you can check what is different...

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        JLX89
                        wrote on last edited by
                        #10

                        @girish So I replicated what you had done in the demo. So that seems to be working now -- after I disabled the plugins we have installed. I'm going to work through and go one-by-one on the plugins and see what is going on. This seems to be a really odd issue.

                        1 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search