Update WordPress on FreeBDS

April 26, 2016 755 views

How do I update WordPress in FreeBSD without using ftp?
Thanks for your help.


1 Answer

A simple method is to use WordPress to upgrade WordPress

Follow this guide to do so.

If it gives an error, or asks for FTP credentials, run this via SSH (changing the document root to the one you actually use:

web_user=$(sockstat -l4p80|tail -1|awk '{print $1}')
chown -R ${web_user}:${web_user} $doc_root

This should set your permissions correctly. If you get no errors, you can then go back to the WordPress page, and refresh it to see if it allows you to upgrade without FTP.

  • When I type the line terminal gives me this error
    [freebsd@assocond-conafiblog ~]$ docroot='/usr/local/www/'

    [freebsd@assocond-conafiblog ~]$ web
    user=$(sockstat -l4p80|tail -1|awk '{print $1}')
    [freebsd@assocond-conafiblog ~]$ chown -R ${webuser}:${webuser} $doc_root
    chown: root: illegal group name
    [freebsd@assocond-conafiblog ~]$

    • If you can discover the web user via sockstat -l4p80, you can just use that in the following command. That should resolve your issue.

      • I have not figured out how I use sockstat. In the system I only have two users: root and freebsd; I have to change l4p80 string? Excuse my inability.
        Thanks again.

        • I used sockstat and gave me this result:
          [freebsd@assocond-conafiblog ~]$ sockstat -l4p80

          www httpd 20305 4 tcp4 :80 *:
          www httpd 20304 4 tcp4 :80 *:
          www httpd 20302 4 tcp4 :80 *:
          www httpd 20297 4 tcp4 :80 *:
          www httpd 20278 4 tcp4 :80 *:
          www httpd 20275 4 tcp4 :80 *:
          www httpd 20273 4 tcp4 :80 *:
          www httpd 20262 4 tcp4 :80 *:
          www httpd 20235 4 tcp4 :80 *:
          www httpd 20234 4 tcp4 :80 *:
          www httpd 20212 4 tcp4 :80 *:
          www httpd 20209 4 tcp4 :80 *:
          www httpd 20205 4 tcp4 :80 *:
          www httpd 20177 4 tcp4 :80 *:
          www httpd 20161 4 tcp4 :80 *:
          root httpd 739 4 tcp4 :80 *:

          • I can't do the work for you (well, I could, but won't), but here's my last idea:

            Assuming the output is correct, the user is "www"

            Now, you need to know where the docroot is. If you don't know where this is, I would advise that you might have bitten off more than you can chew by picking FreeBSD.

            If you know where the document root is, run this, changing /usr/local/www to the proper document root:

            chown -R www /usr/local/www

            If that fails, again, I advise that you switch to Ubuntu or CentOS, as you will be able to find more people who can help support it. Don't just overwrite. Back-up, copy to a new server, set it up, test, then tear down. This way, you have no downtime.

  • Thanks for the information. I accept his criticism on more than you can chew. But sometimes you have to try something new. My blog is an independent association that has fought to update the laws on the protection of purchasers of properties in Italy very penalized. For me it is a challenge for even the maintenance of the blog. Thanks again!

    • Damn it. Go ahead and send me an e-mail

      jon at my username with a . COMmon ending

      I'll help you with hands-on this once.

      If it were a blog about kitties or kites, I wouldn't, but you are fighting for something you personally believe in.

      • Thank you. Meanwhile, I try to figure it out alone with the information that you sent me and documenting on FreeBSD commands. The blog still works. In recent days I had to upgrade the system that gave swap errors, increasing the memory. I see that the blog is about. If you just can not do it I will ask for help.

        • Due to language barriers, I ask that you send your responses in Italian, and I will reply in English. This will speed up your responses, and I can translate it faster as well.

          I am offering to log into your box directly, so you can have me fix it. If this isn't something you want, I can walk you through it via a Google Hangout.

Have another answer? Share your knowledge.