permalinks in wordpress - wordpress

I just moved my wordpress blog from one host to another but permalink is giving trouble. Other than the homepage, other pages give a page not found error.
I edited the htaccess as per instructions
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /projects/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wdmgroup/index.php [L]
</IfModule>
I even tried deleting the htaccess and rewriting but to no avail.
P.S : htaccess and Mod Rewriteare both enabled in Apache's conf
Regards,
Loveleen

Delete .htaccess and reset permalinks from within Admin at Dashboard>>Settings>>Permalinks to be sure permalinks are set in the database as well as in the .htaccess file that WP generates.
Be sure WP is in /wdmgroup/ , because that's where it should be located, according to your .htaccess.
If you're moving WP to root, see Moving WordPress « WordPress Codex.

According to your .htaccess file, your site should be in the http://www.site.com/projects/wdmgroup/ - folder. Is it so? Also, have you update needed entries in the wp_options table in your database?

I found the solution. Everything else was tried but still it didnt work. Later i realized that I had to make a Virtual DIrectory in apache for folder wdmgroup which I had directly placed inside the www folder.

Check your apache configuration and verify that for the directory in which you store your Wordpress installation you have following settings enabled (probably you will have more configuration options for the specific directory, but these are the minimum required for Wordpress fancy permalinks):
<Directory var/www/>
FollowSymLinks
AllowOverride All
</Directory>

Related

Wordpress page not found on AWS

I have transferred a wordpress website on AWS (EC2 and RDS-Mysql servers). The DNS has been setup in Route53.
The wordpress files has been located under directory:
/var/www/html
And the mysql database is imported on RDS. The home page looks fine but when I click on the other pages, it gives "404 not found" error. I have modified /etc/httpd/conf/httpd.conf file to allow WordPress to use permalinks:
<Directory "/var/www/html">
AllowOverride All
I have also checked the size of transferred files and they look as same as the main files.
Any help would be appreciated.
I could solve my problem by adding .htaccess file in the directory of my wordpress files.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
http://guiem.info/permalinks-on-wordpress-amazon-ec2/
Try to follow these steps:
In the WordPress dashboard go to Settings > Permalinks
Without changing anything click on the Save button
And then try to click on the inner pages, it should load fine.
Why does this happen? When you change server, the paths and urls are changed. When you save permalink settings then WordPress will update its rewrite rules and so it will work fine.

Accessing a subfolder of a Wordpress site

So I have a wordpress website installed in the root of my domain and it is up and running fine. I want to install a shopping cart in a subfolder but it's giving me trouble. I have a folder called "magento". In that folder is a filed called downloader.php and index.php.
When I try to access the file, Wordpress was giving me a 404 error like it was thinking I meant it to look for a WP article.
I tried a different .htaccess file which changed it to a standard 500 error now.
I've googled for this and found tons of people with the same problem, but haven't found a solution that works. I also checked the permissions and the folder is 777 and I changed the files to 777 as well but it still doesn't work.
The .htaccess file in the root (public_html) file simply shows
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
I don't know anything about configuring .htaccess files but if anyone has any suggestions on how I can get this to work, that'd be great.
Thanks!!
You can install an empty .htaccess file in the magento subdirectory. This overrides the Wordpress .htaccess file and allows to access the files in that directory.
Never change file permissions to 777. This is dangerous, because it allows anybody to modify your files.

Wordpress permalinks with files and folders out site of Wordpress

I have a wordpress site and I also have pages/files/folders that I've created outsite of wordpress. Right now, I have no permalinks with my URLs as site.com?p=123. I want to have permalinks (pretty links) as site.com/postname (I know the permalink string is /%postname%/). I also have pages that are on my site that have nothing to do with the wordpress site.
When I changed the permalinks in wordpress, all my posts work fine just like they should. But when I try going to an outsite wordpress page/folder like site.com/file_name.php or site.com/folder_name/ I get HTTP 404 not found.
Is there a way that I can do this, or am I stuck with having just the post id permalink?
The default WordPress .htaccess configuration for permalinks should handle files that exist on the file system outside of WordPress. You can read about using permalinks in the Using Permalinks documentation on WordPress.
Of note is the snippet that you're supposed to include in .htaccess (so maybe update your .htaccess file to contain this content):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The RewriteCond clauses tell WordPress that if the current URL either points directly to a file or to a directory, then WordPress will ignore it and let the file load normally.
Open up the Wordpress .htaccess file after enabling SEO permalinks and add the following line on top:
ErrorDocument 401 default
Let me know if that works, or you can always explicitly allow those specific files/folders in the .htaccess file.

404 error transferring wordpress website from local server

I've transferred my wordpress website from my localserver to a folder on my server. It is located in /wordpress. I have created a new database, new user and password and imported. I have also changed the location and home of the website in wp-options. I have changed the wp-config file. I'm still getting a 404 error. I then tried removing all the files, adding a clean install of wordpress then added my theme but still the same error. I can't even access admin or install. Can someone talk a look and tell me what I've done wrong? I have done this before and it normally works fine. Could it be the hosting?
See website here
I've check my .htaccess file and it says the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Check you're .htaccess file. I had this exact same issue the other day. Because it's in a subdirectory, it's keeping track of that in the .htaccess file, and I'm going to guess the subdirectory on the server is named differently than what it was on your development environment :)
Check you're .htaccess file and if you dont want to do coding in htaccess file.
Then login to wp-admin and go to the permalink section and hit update button
Hope it will solve the problem
Thanks
First of all remove .htaccess file and login in wordpress to run normally, lets check to conform this error due to .htaccess file.
Hope this helps you. Thanks ;)

Wordpress Permalinks not working

I moved my site from slichost to Amazon ec2. After moving i made necessary settings for wordpress. My first page for wordpress works fine, but the permalinks are not working.
Can anyone please let me know what changes are necessary to make the permalinks working.
Thanks
Check your apache configuration and verify that for the directory in which you store your Wordpress installation you have following settings enabled (probably you will have more configuration options for the specific directory, but these are the minimum required for Wordpress fancy permalinks):
<Directory var/www/>
Options FollowSymLinks
AllowOverride All
</Directory>
After moving to a new linux host and installing a fresh wordpress, we had to make ALL of the following changes in order to enable pretty permalinks.
Create .htaccess in the correct folder, containing the code as suggested by Krige.
Enable mod_rewrite on apache, then restart the server, as suggested by Mike Lynn.
Change the apache configuration to FollowSymLinks and AllowOverride All for /var/www/, as suggested by Cninroh. For us /etc/apache2/sites-enabled/000-default was the file we had to edit.
I was having issues getting Permalinks (other than default) to work on Mac OSX and the following was very much useful. It seems that by default Mac's are not .htaccess ready by default and Apache will ignore the file until certain files (specified on the links below) are modified:
http://wordpress.org/support/topic/getting-pretty-permalinks-working-on-a-mac-105-server
http://clagnut.com/blog/350/
Hope that helps!
Create a .htaccess file in your wordpress directory and put into it the following code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Source
I was able to fix this by:
logging into wp-admin for my site
changing the Settings | Permalinks option to something different
save changes
changing the Settings | Permalinks option back to its original value
save changes
This seemed to re-enable permalinks, which did not originally work.
Try adding index.php/ before the permalink path.
While checking the apache configuration is essential and probably the first step, you also need to ensure that apache has the mod_rewrite module enabled... Depending upon the AMI from Amazon that you used, you will need to :
Install apache and conditionally enable mod_rewrite.
a2enmod rewrite
Restart the server
Aa
When you set permalinks option other than default, the following code is already posted in .htaccess file.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /callerdb/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /callerdb/index.php [L]
</IfModule>
# END WordPress
But that doesn't help as you already know.
So, this will work when you set rewrite_module, this can be done by going to "fix permissions" if available in your cpanel or you may contact your host.

Resources