• Resolved Peter

    (@hart7511)


    I have several WP blogs (commercially hosted).

    One of them appears to have been attacked and I could no longer get into the admin panel. The MySQL database was still intact so I backed it up, reinstalled WP using Softaculous, and uploaded my backed-up database.

    So far so good. All my posts and comments show up in the admin panel, but when I click on “View Post”, or simply past the URL for a post into my browser address bar, I either get 404 errors or a blank page with no message. There seems to be a problem with the PermaLink configuration. I have tried several settings but none of them seem to work. I know I had set up a custom setting previously but can’t seem to reproduce it successfully.

    I have looked at the guid column in wp_posts, thinking that this might be what WP uses to construct a URL for the post, but it doesn’t seem to correspond to the PermaLink structure that I had previously set up.

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator t-p

    (@t-p)

    seems to be a problem with the PermaLink configuration. I have tried several settings but none of them seem to work.

    -Try resetting your custom permalinks back to the default setting and renaming your WordPress .htaccess file. If that works, then try reading Using_Permalinks before setting a custom permalink structure again. If clearing your Permalinks does not alleviate the issue, this could be attributed to anything from a web server configuration to a bad WordPress install.

    Thread Starter Peter

    (@hart7511)

    Tara,

    Thanks for your suggestion. I did go back to the default setting but I didn’t rename the WordPress .htaccess file, because I am not 100% clear on what this does.

    Questions:
    1. How does renaming the .htaccess file affect the behaviour of PermaLinks?
    2. Can I just rename it whatever I want?
    3. Doesn’t there need to be a .htaccess file for the site to work?

    Thanks. I really appreciate the advice, just need a bit more understanding before proceeding. If this doesn’t work I will probably just do another reinstall. Good thing I backed up the database … ??

    Moderator t-p

    (@t-p)

    please have a read of this codex: Using_Permalinks

    It has very useful info.

    1. Renaming your .htaccess file to say .htaccess.old will prevent it from being read by WordPress and/or the server, and so will negate any url rewriting rules that have been placed inside the file. If you opt to use custom permalinks again then wordpress will create a new htaccess file with the code inside to rewrite the urls to something more human friendly.
    2. Yes, renaming the file to anything other than .htaccess will prevent it from being read, and the rules inside being applied.
    3. No, in theory you don’t need an .htaccess file for the wordpress site to work, but if you want to modify your permalinks to something more user friendly, add additional security features (manually or through a plugin) or add SEO elements such as expires, then .htaccess is the place to do it.

    Be warned that this file is super sensitive, and any changes can break your site. It’s always a good idea to backup the content of your .htaccess file before making any changes to it.

    Thread Starter Peter

    (@hart7511)

    Thanks for the detailed replies.

    Renamed .htaccess file and used one from another WP blog that is working properly.

    Restored default PermaLink settings.

    Neither of these steps made a difference. Still cannot view posts except from within the Admin dashboard (in edit mode). When I click on “view post” I get a blank screen.

    However, I can see my posts on my mobile phone (Android) in the WP app.

    Go figure !

    All help thus far is greatly appreciated and any further insights would still be welcome. If all else fails, I can always try another install.

    Thread Starter Peter

    (@hart7511)

    Decided to try activating a different theme. Problem solved. Seems the theme that was part of my previous install was broken. Thanks for all the help.

    Thread Starter Peter

    (@hart7511)

    Resolved.

    @peter
    Great to hear you’ve identified the issue and resolved things.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PermaLink issues after site rebuild’ is closed to new replies.