dragolux
Member
Posted 3 years ago #
Today, I changed the URL of my blog from http://www.tutorialwow.com/WP25/ to http://www.tutorialwow.com/, and it's made a problem. Whenever I go to my edit one of my posts, the "Preview this Post" button is broken. In stead of linking to something like /WP25/?p=17&preview=true, it links to just ?p=17&preview=true, which is of course a broken link.
Is there any way to fix this? If so, which file should I edit?
Thanks!
Dragolux
dragolux
Member
Posted 3 years ago #
I looked there, and it didn't tell me what to do. Unless, is this what I'm supposed to do?
11. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can't write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)
If so, how do I do this? Here are my current permalink settings:
Custom Structure: /%category%/%postname%/
Category base and Tag base are empty.
What should I do?
You may have had to update your index.php file, then you'll also want to go to the Permalinks page and click the Update button.
dragolux
Member
Posted 3 years ago #
What do you mean "Update my index.php file"? How should I do this?
(Thanks for all of you help, by the way. ;) )
Check the link I posted earlier and look at step 8 -->
dragolux
Member
Posted 3 years ago #
Oh yes, I did that already.
My question is: What file holds the code for the "Preview this Post" button? If I can get to that file, then I can just edit it to make the link point to the right place.
I think that would be hacking WordPress core files and there should be no need to do this.
Try clearing your browser cache and trying again. I think you've something else going on.
dragolux
Member
Posted 3 years ago #
Nope, I cleared the cache, but it's still the same. :-/
So your WordPress URL should be set to:
http://www.tutorialwow.com/WP25/
and your Blog address is set to:
http://www.tutorialwow.com/
Is that what you've got?
dragolux
Member
Posted 3 years ago #
Yup. I changed that just today.
Did you take step #7 in the link I provided above? Copying your .htaccess and index.php to the root directory, then editing the index.php file in step #8?
dragolux
Member
Posted 3 years ago #
Yes I did. I copied both of the files over, and changed index.php from require('./wp-blog-header.php'); to require('./WP25/wp-blog-header.php');. This is strange!
dragolux: I don't fully understand your problem here. Why is that "of course" a broken link? That link is correct.
If your site is at http://www.tutorialwow.com/ then the link to your posts (before they are published) will indeed be of the form http://www.tutorialwow.com/?p=17&preview=true . That is the correct link, it's not broken.
Note that after you publish the posts, that link will change to their published address.
Not sure what to tell you, I guess.
I'd double-check all of your work - every changed link and file and go through all of the steps again. I know it works, so I'm thinking it has to be something simple that's been overlooked, or not quite changed.
Make sure your .htaccess is updated.
dragolux
Member
Posted 3 years ago #
Wait a minute....It works! Oh man, it must have been when I cleared my chache! Thanks for helping out, guys! (slaps himself on head)
Glad you got it working. :)