New answers tagged

0

I use this bash command to reset WordPress file permissions quickly and easily, just navigate to your root WP folder and run both: directories find . -type d -exec chmod 755 {} \; files find . -type f -exec chmod 644 {} \;


0

Instead of playing with .htaccess file I would recommend using WordPress "Redirection" plugin, it allows for redirection and also logs them.


0

I think you may be mixing up a couple of concepts here. Use the new template page you made and name it archive-portfolio.php. This will display all portfolio post types in your new template at yoursite.com/portfolio and the url for the portfolio items should take care of itself. They will still be at yoursite.com/portfolio/item1 so no need to change the ...


1

How do we add a second IP address that is allowed to see the site in development? We can just append just second REMOTE_ADDR like this since the default flag is [AND] # BEGIN Maintenance <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REMOTE_ADDR} !^11\.111\.111\.11$ #First Address RewriteCond %{REMOTE_ADDR} ...


2

Set the rules above the WordPress rules and use the [OR]/[AND] operators to concatenate RewriteRules (by default [AND] operator is used): RewriteCond %{REMOTE_ADDR} !^11\.111\.111\.111 [OR] RewriteCond %{REMOTE_ADDR} !^22\.222\.222\.222 [AND] RewriteCond %{REQUEST_URI} !^/maintenance\.html$ RewriteRule ^(.*)$ http://domain.com/maintenance.html [R=502,L] ...


0

Change the following and save the file. Change the line that says: require( dirname( FILE ) . '/wp-blog-header.php' ); to the following, using your directory name for the WordPress core files: require( dirname( FILE ) . '/Folder Name/wp-blog-header.php' ); Login to the new location. It might now be http://example.com/wordpress/wp-admin/ If you have set ...


0

So I discovered the answer after reading through my question after I posted it.... The htaccess rules need to go BEFORE the WordPress rules There you have it. That was the problem this entire time. I'm going to bed.


0

You can use question mark: RewriteRule ./?$ /index.php [L]


0

I liked the idea of Chris_O, but I made my own version, which is more safe. So what I did, I just added folders to exception, so if your requests starts from those lines - it's definitely not a valid permalink. The majority of requests are coming from bots that are trying to check the contents of those folders for exploits. They will be effectively filtered,...


0

Here is what I have in my own .htaccess file that does what you're looking for: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymLinks RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^example.html$ /wp-content/raw/example.html [L] RewriteRule ^download$ /wp-content/raw/download-ebook.html [L] RewriteRule ^thanks$ /...


1

Using remove_action() can be remove unnecessary links for example: remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link. remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link. remove_action('wp_head', 'wp_generator'); //removes meta name generator. remove_action('wp_head', '...



Top 50 recent answers are included