Question

i can't upload images and themes ...

Posted February 28, 2017 2.2k views
WordPress Ubuntu 16.04

hi every one , i just migrate my website to DO and i have this problem of uploading images and themes ,here is my error log:

[Tue Feb 28 22:15:09.659684 2017] [authn_file:error] [pid 31692] (2)No such file or directory: [client 196.64.42.:**] AH01620: Could not open password file: /etc/apache2/.phpmyadmin.htpasswd, referer: http://www.exemple.com/wp-admin/post.php?post=12160&action=edit

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

@abderbij

That specific error is stating that /etc/apache2/.phpmyadmin.htpasswd does not exist.

Inside your .htaccess file, are you referencing that file? If so, you’ll need to make sure it exists as any problems with your .htaccess file may cause issues elsewhere since WordPress relies on it heavily.

  • no there is no htpasswd in .htaccess

    BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUESTFILENAME} !-f
    RewriteCond %{REQUEST
    FILENAME} !-d
    RewriteRule . /index.php [L]
    RedirectMatch Permanent wp-admin/install(-helper)?.php /
    </IfModule>

    END WordPress

@abderbij

Have you checked other directories to ensure that another .htaccess file does not exist? That error is telling me that there is password protection somewhere and it’s trying to locate that file, but since it’s not found, it’s logging the error.

As far as the .htaccess file you posted, the following line shouldn’t be required and isn’t part of the normal WordPress .htaccess:

RedirectMatch Permanent wp-admin/install(-helper)?.php /
  • this is not the problem i figured it out,its just on permission folder for
    wp-content/themes
    ../plugins
    ../uploads

    sudo chmod g+w /var/www/html/wp-content
    

    and

    sudo chmod -R g+w /var/www/html/wp-content/themes
    
    sudo chmod -R g+w /var/www/html/wp-content/plugins
    
    sudo chmod -R g+w /var/www/html/wp-content/uploads
    

    thanks dude!

Submit an Answer