I have a website that is written use static html pages. It contains many URLs containing subdirectories like this:
https://www.example.com/product1/order.htm
https://www.example.com/product1/error/error1.htm
Now I want to create a new website via WordPress and transfer all contents from the old website to the new one.
So I wonder what is the best practice to process all these URLs with subfolders.
Should I:
- Keep the subfolders by using parent/child pages, like this:
https://www.example.com/product1/order.htm -> https://www.example.com/product1/order/
https://www.example.com/product1/error/error1.htm -> https://www.example.com/product1/error/error1/
Or
- Remove all subfolders, and chaning all URLs like this:
https://www.example.com/product1/order.htm -> https://www.example.com/product1-order/
https://www.example.com/product1/error/error1.htm -> https://www.example.com/product1-error-error1/
Or using other methods?
Thanks
Update:
With the hint of others, I get to know there are categories in WordPress. I search online and find the following URLs:
https://www.wpbeginner.com/wp-tutorials/seo-friendly-url-structure-for-wordpress/
https://www.wpbeginner.com/beginners-guide/categories-vs-tags-seo-best-practices-which-one-is-better/
So it seems using categories is a good practice to keep a hierarchy structure in WordPress. Is that correct?
Update 2
I have a question. In traiditional websites, for a product, normally the home page is https://www.example.com/product1/ , while the additonal pages such as https://www.example.com/product1/order.htm are put under the “product1” subfolder. Now in WordPress, their URLs should be:
URL1: https://www.example.com/product1/ ->(Unchanged) https://www.example.com/product1/
URL2: https://www.example.com/product1/order.htm -> https://www.example.com/product1/order/
In such a case, whether should I set product1 as a postname(for URL1) or a category(for URL2)?
3
Answers
Good…
The WordPress directory manager is something that until now I only saw in the media gallery …
But if you want something, you can have control over the installation of Total WordPress …
In addition to database errors and PHP for free …
It offers a range of services like PHPMyAdmin, installing WordPress via a script, file manager, whatever you are looking for … Logging errors and even how you set up email, spam, you can see what space on the disk hard drive and RAM what kind of CPU you are using.
Configure your localhost on your domain from your server …
He’s very complex, I mean, he’s very complete.
It’s Webmin if you are a basic user, now if you are a more advanced user … I recommend Virtualmim these two implements that can be easily installed and also configured very quickly.
It offers a variety of attributes for you to have control of your WordPress.
But it also depends on your hosting …
As they are installed via the command line / SSH, so if you don’t have this option in your hosting, it gets a little more complex if you have VirtualMin or Webmin…
I would suggest looking into registering custom post types. You can program those, or use a plugin like CPT UI. You then get a custom link structure that is e.g.
example.com/products/awesome-product
. This would then be the ‘detail’ view.I’m not sure if you have separate order and error pages, but that could be part of the permalink structure in WordPress as well. You might even setup rewrites for the
example.com/products/awesome-product/order
andexample.com/products/awesome-product/error
parts to have a specific page loaded, or the detail view and then have a custom layout based on these url parts.If you used the product ID’s in the old site, you could also create a custom permalink structure have it like this:
example.com/products/1
. That way you could easily rewrite url’s in .htaccess from the old site to the new using just one rewrite rule and regex for the id’si think you more or less answered your own question. But to be clear based on experience.
https://www.example.com/product1/order.htm -> https://www.example.com/product1/order/
install this plugin: ‘WP 404 Auto Redirect to Similar Post’ Automatically Redirect any 404 page to a Similar Post based on the Title, Post Type & Taxonomy using 301 Redirects!
It will find the updated pages / posts in a heartbeat.
Benefits are it will also deal with all 404s, and redirect them to simular pages which helps with SEO.
Its a lazy mans approach, as its one more plugin, but it works..