• Resolved sebacodroipo

    (@sebacodroipo)


    I am running Mint Cinnamon 19.1. I managed to install two wp site in two separate folders (after solving other problems https://ww.wp.xz.cn/support/topic/two-wp-installation-on-localhost-linux/#post-12694151),

    the structure now looks like this:

    /var/www/
    ├── html
    ……└── firstsite
    └── secondsite

    so after installing secondsite, I found out I couldn’t install nor update any plugin because I always got a request to go through FTP. This was happening on both sites. I looked around on various forums and found a solution adding the

    *define(‘FS_METHOD’,’direct’);

    in the config. file and modifying the Permissions for both html and secondsite folder. After some trial and error yesterday, I found out that I had to set the permission as

    Owner: www-data
    Folder Access: Create and delete files
    File Access: –

    Group: www-data
    Folder Acces: Access files
    File Access:

    Folder Access: Create and delete files
    File Access: –

    This morning I logged in on secondsite. I tried installing a theme but got again the FTP problem, I went back to the config file and permission and set them up again. I don’t know what went wrong, but I now can’t connect to neither secondsite/ nor to secondsite/wp-login.php. I always get error 500. I activated in the config file the debugging options

    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_LOG’, true );

    but no error log gets created when I try to load the page.
    I had only installed Jetpack yesterday night, I tried deactivate the plugins by renaming the folder (as suggested in numerous forum threads regarding this issue) but to no result.

    As for firstsite/, everything is working perfectly, I can log in and download/update plugins and themes.

    Any suggestion?

Viewing 5 replies - 1 through 5 (of 5 total)
  • always get error 500. I activated in the config file the debugging options

    Ok, so what file permissions did you set? Can you check your PHP error log?

    Thread Starter sebacodroipo

    (@sebacodroipo)

    @a2hostingrj where do I find my PHP error log? No error log gets created in my WP-content folder or are you talking about another error log?

    Could be a permissions problem like @a2hostingrj said, as I always unpack wordpress as root to a download directory then do the following install procedure for localhost:

    
    How to install an evaluation copy of WordPress 5.4 on localhost.                    
                                                                                        
    * Prepare the 02-PASSWORDS file for the new website.                                
                                                                                        
    * Create the WordPress MySQL database and username from MySQL text console.         
                                                                                        
    * Install the WordPress code on localhost.                                          
                                                                                        
    1. unpack wordpress in the downloads directory as root user with                                 
    
    # tar -zxvf wordpress-5.4.tar.gz 
    wordpress/
    wordpress/xmlrpc.php
    wordpress/wp-blog-header.php
    wordpress/readme.html
    
    2. change permissions with
    
    # chmod 777 wordpress -R
    
    # ls
    original  wordpress  wordpress-5.4.tar.gz
    
    3. convert CR/LF microsoft line endings to Linux with:
    
    aspire-laptop 5.4 # endlines check -r wordpress
    endlines : dry run, scanning files
    
    endlines : 1708 files checked ; found :
                  - 71 No line ending
                  - 1632 Unix (LF)
                  - 3 Windows (CR-LF)
                  - 2 Mixed endings
               193 binaries skipped
               2 hidden files skipped
    
    aspire-laptop 5.4 # endlines linux -f -r wordpress
    endlines : converting files to Unix (LF)
    
    endlines : 1708 files converted from :
                  - 71 No line ending
                  - 1632 Unix (LF)
                  - 3 Windows (CR-LF)
                  - 2 Mixed endings
               193 binaries skipped
               2 hidden files skipped
    
    aspire-laptop 5.4 # endlines check -r wordpress
    endlines : dry run, scanning files
    
    endlines : 1708 files checked ; found :
                  - 1708 Unix (LF)
               193 binaries skipped
               2 hidden files skipped
    
    4. copy the unpacked code from downloads directory to the target directory.
    
    eg. copy to: 
    
    /var/www/html/websites/evaluate/wordpress/5.4
    

    HTH 🙂

    • This reply was modified 6 years, 1 month ago by pcxt8088.
    Thread Starter sebacodroipo

    (@sebacodroipo)

    @pcxt8088
    Thank you very much for the detailed walkthrough, there are a lot of interesting informations for my next install. I actually amnaged to get an error log from the second site adding the line ErrorLog /var/www/secondsite/error.log to my virtual host in the 000-default.conf file in apache. In the end I had forgotten an * before define('FS_METHOD','direct');, I cancelled it and now everything’s working fine.

    Thank you @pcxt8088 and @a2hostingrj for taking your time and helping me 🙂

    • This reply was modified 6 years, 1 month ago by sebacodroipo.

    Hi @sebacodroipo,

    I’m very pleased to hear you have got it all sorted out now.

    Well done!

    🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Error 500 on localhost, possible issues with permissions.’ is closed to new replies.