Strange WordPress behavior whe I try to open an article - wordpress

I am developing, on my local web server, a simple Word Press blog but I am finding a strange behavior
After that I have post a new article, it appear in homepage but, when I click on its title to open it, appear the following error message:
Not Found
The requested URL /wordpress/archives/56 was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 80
I have the same problem also if I try to click on the related category icon of the article or if I click on the "add your comment" icon
If I don't use Permalink seems work fine !!! So the problem is related to the Permalin....
Why? some ideas to solve using Permalink?

As Vickey says above, you need to update your .htaccess file to use permalinks.
If your Wordpress installation is inside a folder called 'wordpress' inside your root folder then it will be similar to this;
# 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

Related

links redirect to dashboard xampp

I've moved WordPress from hosts to Xampp local hosts.
I corrected the links inside the database. Although the home page is loaded.
But on every link, I'm redirected to the http: // localhost / dashboard page.
I use WordPress 4.9.6, Xampp 3.2.2 and Windows 8.1 64-bit
my .htaccess file
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
please guide me, thanks
For me, changing the .htaccess file as #Ustav suggested did not resolve the issue. After making that change, while I was no longer redirected to the XAMPP dashboard, I was instead redirected to a 404 page from Apache.
What did resolve the issue for me was simply navigating to Settings > Permalinks in the WP admin, scrolling to the bottom, and clicking "Save Changes", an idea I got from this WP forum page. That immediately fixed it, no changes to .htaccess required.
The remote-to-local transfer instructions I followed can be found on this 1&1 Ionos instruction doc
Try this:
Go to htaccess file.
Inside
<IfModule mod_rewrite.c>
...
</IfModule>
Put this code
RewriteRule . FOLDERNAME/index.php [L]

Wordpress Permalink Settings not working

I have installed a test blog on RichBloggers Domain. I am trying to use permalinks. With My current settings as follow
The site links works but with query string in url like
But when I change the setting to post name
My Links give me error
Here is my .htaccess
# 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
What am I missing?
Finally I figured it out. The Hosting Server I am using has old Plesk on it and doesn't have cPanel so the PHP version is outdated. URL rewrite is not working because Mod_rewrite is not enabled.
check by deactivating other plugins once and check by setting theme from WordPress default theme.
and then by setting permalink again.
check if this issue still coming. otherwise it will be conflict issue.
Simple click again the permalinks post name radio button and save it, it will solve your problem now.
Check if the category exist if not then it would throw that error.

Images are not working after redirecting to root/ wordpress

I have problem with images on my website. I have installed wordpress in blog directory, co I could access my website like mysite.com/blog. I have followed tutorial on this page Giving_WordPress_Its_Own_Directory (Using a pre-existing subdirectory install), to redirect it, so I have changed site address url in settings to mysite.com, add index.php to root and add /blog/wp-blog-header.php in this fileā€¦ I also have to update permalinks and htaccess copy to root, with 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
Now my website is working fine but images are not working. I can see them but after click on them it shows 404 error page. There is /blog/ in image url. If I remove blog from url manually, it shows page with image (lightbox is not working) Could somebody help me how to solve this? thanks
I'd try Better Search Replace plugin to change urls of images in database.

WordPress Permalinks Issue on Amazon Web Services

I have a weird issue with my permalinks in wordpress hosted on AWS.
When I navigate to the first post located at http://civicasoft.com/news/
In my browser it shows a nice permalink for the first post of: http://civicasoft.com/granicus-acquisition/
But when I copy and paste the url from my browser it gives me this ugly one: http://civicasoft.com/%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BC%EF%BF%BCgranicus-acquisition/
Any ideas what is going on? Everything looks fine from the admin.. If I type in the nice looking url it says page not found.. I have to paste in the ugly one.
I am at my wits end. I have never had these issues with a wordpress install before.
######BEGIN SwiftSecurity######
######END SwiftSecurity######
# 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
Hey I figured out what the issue was. It turns out my client had copied the title of the press release from a PDF and that brought weird character encoding into Wordpress for some reason. I figured this out after numerous trial and error attempts including multiple attempts recreating the post.

How can I get my permalinks working when uploading the database to a localhost?

I've been working on my localhost machine developing my wordpress site, and I'm going to export the database and import it to another localhost on another machine. The thing is, I've tried it already and when lets say you click on about it gives a 404 error not found in database. I'm using custom permalink structure /%postname%/
But when in the new localhost I change the custom to default it works. I don't want to /p?=123 at the end of my URL since I already have my links set up. Was wondering how I can set up the links to work?
you need to click on the wamp server, choose the apache menu -> apache modules then move the menu down and choose rewrite_module. You will need the server to restart for the changes to take affect.
If your .htaccess file is writable and mod_rewrite is enabled, WordPress will insert this code when you change the permalink structure. If it is not writable, WordPress will let you know to copy and past this code into the .htaccess
# 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

Resources