Hey gang, I’ve decided to make a few changes that I’ve been thinking about for a while, and I felt like they were big enough to comment on.
First of all, I’ve finally moved away from a WordPress URL and gone with http://findingtruth.info. I would have loved .com or .net, but apparently the title of my blog is pretty catchy. The old one (findingtruth.wordpress.com) will still work, but you’ll be redirected to the .info address.
Secondly, I’ve moved to a new theme. I really liked the old one, but this one caught my eye — feel free to let me know what you think about it.
Finally, based on a friend’s suggestion, I’ve decided to use a static homepage for the site, so new visitors can get an idea of who I am and what the blog is about before they’re dropped in front of my latest post. This means the blog articles will now reside at https://findingtruth.info/blog.
These are definitely the biggest changes I’ve made to the blog since I switched it from a Christian to an atheist perspective. I’ll leave it up to you to decide which change was more impactful. 🙂
Feel free to weigh in on these changes — I’m curious to see how they affect the user experience.
Hi unkleE,
Thanks for all the input!
So with the site you’re talking about, it was built with WordPress, right? If so, the file structure you’re describing sounds a little unusual. First of all, I suppose the files you’re talking about are actually PHP files, not HTML, right? In other words, they have a .php extension. Also, WordPress doesn’t usually keep a blog folder in its directory, because each blog post uses the single.php template file, which is usually in the theme’s root directory. If you have a blog folder, then that would make me think that you might have two separate WordPress sites on the same server: one at root and one in a blog directory.
The simple answer to your question is that routing can usually be handled one of two ways: either in a .htaccess file, or in the database. WordPress sites use the database to store the blog_home() and site_url() values. Those are functions used in the code to tell your files what the root directory is. It’s possible that “/blog” is attached at the end of those URLs in your database. Removing that would probably keep you from having any db issues if you moved the files around. However, without seeing the actual FTP setup, it’s hard for me to weigh in too much.
If you want, feel free to email me, and I might be able to help you out a bit more. 🙂
LikeLike
No need, I actually agree with you on this one point – I KNOW! That’s once in a row!
LikeLiked by 1 person
Unfortunately, no one knows whom I was addressing. It was Unk.
LikeLike
Nate,
Looking at UnkleE’s site, it looks like the root folder does not have wordpress on it. He probably wants to convert those static pages into wordpress pages so that they can be easily edited.
UnkleE,
I think you can achieve what you are trying to accomplish using mod_rewrite. It can essentially take a request for “domain.com/page.htm” and map it to request a different file on your server like “/blog/whatever”. It does all of the file mapping on the server and the client browser thinks it is reading from “domain.com/page.htm”.
You’ll have to find out from your web host if you have access to use mod_rewrite.
LikeLiked by 1 person
Hi Nate & Dave,
Yeah Dave’s right. It’s currently a HTML website with a WP blog attached, and I’m planning to convert the HTML pages to WP pages – to better allow automatic links to similar pages, etc. I won’t take up too much space here (after all, we wouldn’t want to go off topic would we? 🙂 ), but briefly ….
Dave, I presume the mod_rewrite goes in the .htaccess file, and that means the “real” URL of the pages contains the /blog but it appears to have a different URL to visitors who use the abbreviated address? But when copying and pasting a URL link it would still have the longer URL. That is certainly a solution, but I feel it is a bit awkward. But thanks, it is at least a possibility.
Nate, do you know where in the DB that info is stored? And do you know if I can change the PHP somewhere to change the URL and eliminate the /blog? There is a function “get_site _URL()” that may be relevant, and I’m wondering whether I can modify this in some way to eliminate the /blog. I’ll email you, thanks.
But maybe it’s all too hard. Thanks heaps for helping me out.
LikeLike
unkleE,
Have you run across this article yet? It shows where the variables can be updated in wp-config.php, how you can sometimes do it from the functions.php file, and where those values are stored in the db. It can still be a really tricky process, though. And because each person’s setup can vary (sometimes substantially), it’s not always easy to know which steps will be necessary.
Anyway, I’ll look for that email. And maybe pull Dave in to help with it too. 🙂
LikeLike
Yes, the trick would be to never use the unwanted URLs and always use the abbreviated form.
Ideally, you would move WordPress to your root directory and have it controlling the entire website. However, if you do this you may run into some issues. Especially if you want to keep all of your URLs exactly the same as they are now. It looks like your static pages end in .shtml and I’m not sure if you could get WordPress to mirror that. I think you would end up having to change a lot of your URLs which means you’ll want to make sure and use 301 redirects from all of the old URLS so you don’t leave Google wondering where all of your content has disappeared to.
LikeLiked by 1 person
Thanks guys, this is looking more and more difficult! I think I’d forgotten about the .shtml files. However I go, this could be messy. It’s sounding more and more like I’ll just have to accept significant changes to my URLs and just cope with it. I’ll think a bit more and send an email thanks Nate.
LikeLike