Wordpress url and folder structure - wordpress

I'm working on migrating a static site to a new one based on Wordpress as a work platform.
The old site contains static html pages and a separate folder for the blog.
As a result I get the following URLs www.mysite.com / blog / category-name / post-number-one.
On the new site, WordPress turns the URL into www.mysite.com / category-name / post-number-one, removing the blog/ part.
For the sake of SEO, I must keep these urls like the old site. Is there a way using Wordpress to maintain this structure for blog posts only?

Yes, in the Wordpress admin, go to the Settings Tab, then the Permalinks menu. There will be a section called "Category base". Add "blog" there.
That should make it so the blog the categories are prefixed with /blog/category-name/post-number-one.
I had a similar issue. Basically I was running two Wordpress installations. One for pages and one for blog. Long story behind that.
But I eventually I needed to merge the WP installations.
In my case I also needed to go to Settings -> Reading and set the Posts page to "Blog", which was an empty page I named Blog also. This made it so the blog would be viewed at http://mydomain/blog/. I'm not sure if you wanted that too.
But yeah for the categories, you just need to add "Category base" under the permalinks setting.

in your general settings, you can set a subfolder as your url, which can be hard to debug when you have problems, in my experience.
the other is that if you go into your clean urls settings page, you probably can simply add a string before your other %params%

Related

Use title based slugs and archive IDs at the same time

A wordpress site I am working on was previously windows hosted and could not use htaccess to hide the index.php. All 200 or so news items are indexed by the search engines like
sitename.com/index.php/archives/5574‎
The site is now being moved to Linux, and the news items will now be like
sitename.com/big-story-of-the-week
If I change the permalink structure as proposed, is there any way I can get the site to still route the old index.php/archive links?
In your .htaccess file, you can add the following code using your sites URL structure:
Redirect 301 index.php/archives/5574‎ http://sitename.com/big-story-of-the-week
This would have to be done for each page.
More info here: http://wp-mix.com/redirect-urls-htaccess/
(Be sure to backup your .htaccess prior to making changes)

how do i move a wordpress blog to a wordpress site with a blog

Client had a flat file php site and wanted a blog, so I installed wordpress stand along blog. Now they want to convert then entire site to Wordpress. The current blog is in a subdirectory called "blog". I would like to create a blog page called "blog" on the new site and import the posts that are in the WP standalone blog installation.
Can I just take the SQL statements and insert them as autoincrements in the new database. How do I import the tags and categories. What about the author number? It will be painstaking, but I don't want to cut and paste a hundred blog posts.
Install WordPress in root http://codex.wordpress.org/Installing_WordPress .
Create a page called Blog with the slug of /blog/. Set that as your posts page in Dashboard>>Settings>>Reading.
Export your posts,categories, authors and images from the current blog via http://codex.wordpress.org/Tools_Export_Screen and then import them http://codex.wordpress.org/Importing_Content into the new WP site. You should be able to keep the same structure to your permalinks.
Then, if needed, create static pages to match the current php pages and cut/paste the content into them.
Why wouldn't you just make the primary site URL point to the blog site? Or take a full backup of the blog site and restore it on the main server in doc root? Then add your pages content right in the current blogging site? You can point both www.whateversite.com/blog/ to the posts (blog page) or even blog.whateversite.com to the same.
Seems like a LOT of extra work to setup a new WordPress install then go to a current WordPress install and export the blog posts then re-import just the blog posts.
If you absolutely have a great reason for not just using the current WordPress install and building on that then I suggest you spend the $15 and get VaultPress from the Automattic group and backup the blog site. Then use the restore to alternate URL feature to clone it to a brand new WordPress installation you've started at the new main site. It will restore the content and replace inline URLs for you which is a HUGE time saver.
I've moved / cloned multiple sites this way. It is by far the easiest method, especially if your in-blog URLs need to change from blog.blah.com to www.blah.com.

Wordpress URL rewrite

I am trying to merge my custom made directory site together with my wordpress site in one domain.
There seems to be issues with the url being redirected to my wordpress categories. How can i rewrite url in wordpress to compliment my directory site.
I don't think it's possible. Category, tag, page, post etc. slugs could collide with your directory names. You would have to either create a filter for WP to redirect specific URLs to your old content or modify your .htaccess file. Both methods are extremely complicated if you have a lot of pages, and overkill if you have only a few.
Why not migrate your old content to WP? Or if you don't want to do that, install WP into a subdirectory of your site, like /blog.

Converting a static site to a Wordpress site...how to transfer/convert SEO rankings?

I'm going to convert a client's static site, all hand coded HTML pages to Wordpress. They have a bunch of static pages that I'm going to keep as 'pages' in Wordpress. There will be some static content that I'm going to convert into blog entries (and back date them).
How do I transfer their search engine rankings to the new Wordpress site? Some will be a static page converted to a Wordpress 'page' and some will be a static page converted to a blog entry?
Use 301 redirects in your .htaccess in root. All search bots recognize 301 redirects as permanent redirects and don't drop the pages from indexes, but reassign the URL. Put them above the Wordpress rewrite block in .htaccess.
The format is:
Redirect 301 /myoldurl.html http://mydomain.com/newpagename
Notice that the domain is not included in the first URL, only the page name with suffix, assuming it's in root.
Or use WordPress › Redirection « WordPress Plugins to manage redirects inside the WP admin area and log them, too.
You can usually create a permalink structure to match the client's old URL structure.
This is better than the htaccess approach since it is easier to maintain long term. The client won't have to adapt to a new URL structure, and you won't lose any SEO value as you would with 301s ( http://www.marketingpilgrim.com/2010/03/google-confirms-301-redirects-result-in-pagerank-loss.html ).
For example if the old client URL was:
http://www.example.com/blue/widgets.html
you can use the permalink structure of:
/%category%/%postname%.html
You would then create a page (or post) with the post slug of 'widgets' and categorize the page within the 'blue' category which would give you the exact same URL as they had before.
If the old site uses a variety of inconsistent URL formats, this approach is slightly less effective. But you can still do this with the most used URL format, then 301 the other URL formats.
Hope this helps!
In your destination server, you can customize the .htaccess file to redirect old pages URL to new ones. The old URL will still work and the page rank will be kept.
I would consider using Jekyll to do this. It will enable you to create exactly the same site with the same HTML structure. It will give you full control, and therefore not damage SEO. You can add CloudCannon as a CMS and make your site responsive using media queries, like this: http://www.usecue.com/2016/04/21/two-viewports-to-rule-them-all.html. Baby steps will avoid SEO disasters.

Wordpress: Two different Permalinks for same Blog

Is there any way we can have two different Permalinks in a Wordpress blog? This is because lot of us starts blogging when we have limited knowledge of SEO and end up in some URLs which are not that SE friendly.
Hence lot of pages from Blogs are already indexed by search engine and we do not want to spoil old URLs.
Thus I want to create new Permalink that is different than the old one. Only the newer post should use this permalink.
Is there any solution to this problem? Without 302 redirect we want to create 2 different Permalinks in the same Wordpress blog.
If I understand you correctly, you want to access the old posts only with the old permalink structure (e.g. ?p=123), and the new posts only with the new structure(e.g. /2009/08/name-of-article).
I'm afraid this is not possible without rewriting the Wordpress code (see short explanation at the end of my answer).
However, I think that Scott Yang's permalink redirect plugin (scroll down to FAQ) or Dean Lee's permalink migration plugin could be a solution.
Edit: both sites no longer exist. There are snapshots on Archive.com:
Scott Yang’s plugin, Dan Lee’s plugin.
These plugins are over 10 years old, however. The WP Redirect Permalink plugin might provide a similar service.
When Wordpress generates a link (e.g. for a new article, for "continue reading" links or for search results), it will use the new permalink structure, even for the old posts (which sadly isn't exachtly what you intended). If someone however uses an old permalink, it will be rewritten on the fly and the user (or SE) will be redirected to the correct page.
This 301 redirect should keep your page rank.
Explanation why having different permalink structures for old and new posts in parallel would mean changing Wordpress code:
For each post, Wordpress stores an unique ID (e.g. "123") and not necessarily unique post name (e.g. "name-of-article") in the database.
When an URL with a permalink like /2009/08/name-of-article is accessed, Wordpress translates this according to the currently configured permalink structure. If it constructs a link, it also does this according to the currently configured permalink rule.
You would need to add code toe Wordpress so that it uses two different rules depening on the age of the article.

Resources