File and directory permissions

The PHP files in the wp-includes directory will do nothing when accessed directly. They are designed to be include()‘d in an existing PHP script, such as on the front-end or in the dashboard. Your Options -Indexes entry in the .htaccess file simply prevents a list of the files in a directory when no index.php is … Read more

How to stop wordpress from changing default .htaccess permissions to 444

Your site has likely been hacked. My site had the Darkleech infection, which injected some malicious code into wp-includes/nav-menu.php, causing .htaccess to reset to 444 on any page load. I’d recommend you install the Sucuri plugin and let it restore any files that have been corrupted. Assuming your site was hacked, use their Post-Hack tab … Read more

Protecting direct access to PDF and ZIP unless user logged in (without plugin)

RewriteCond %{REQUEST_FILENAME} -s RewriteRule ^wp-content/uploads/([^/]*\.(pdf|zip))$ filecheck.php?file=$1 [QSA,L] This actually looks OK, except if you have additional subdirectories within the /uploads directory? An alternative is to include an additional condition on the original rule that only rewrites the request if the request ends in .pdf or .zip. For example: RewriteCond %{REQUEST_URI} \.(pdf|zip)$ [NC] RewriteCond %{REQUEST_FILENAME} -s … Read more

multisite 404 error for subdirectory

I had the axact same problem. My solution: edited/etc/apache2/sites-enabled/000-default.conf. It needs to look like: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /var/www/> Options FollowSymLinks AllowOverride all Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> It works!

htaccess problem after saving Settings

Ok I figured this out and I am providing answer just for the case that someone else experiences this problem. The problem was in the plugin that was used on the original automatic installation of the WordPress done via Mojo Marketplace. The name of the plugin was Endurance PHP Edge and it was not in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)