Viewing 15 replies - 1 through 15 (of 35 total)
  • Hi jumust. I’m not familiar with the redirect plugins myself, but I know my colleagues have tested several of them and they do work.

    Is there a specific reason you’re wanting to put wordpress in a sub directory? You should be able to go that route and use .htaccess to only show the main domain (and not the installed sub directory), but that doesn’t sound like the easiest way to go.

    Thread Starter jumust

    (@jumust)

    Hey Brad,
    I want to use the subdirectory only because in the root there are files of old site and I’m worried to mess things up. I should not delete old files, right?

    With those plugins I should do everything manually, example
    Old site : http://www.mysite.com/articles.php?subcategory_id=68
    New site : http://www.mysite.com/category

    Or

    Old site : http://www.mysite.com/article/35523/postname
    New site : http://www.mysite.com/category/postname

    Will it work? There is no solution to make things automatically? Is this the cleanest way to not lose all google benefit?

    Thanks

    There is no solution to make things automatically?

    Any of the plugins you listed above look like they will do the job for you, but I don’t believe you’re going to be able to do things automatically. Unless you are familiar with php, it would be quite difficult to automate the redirects.

    How many articles would you say you have on your old site? Are we talking tens or hundreds (or more?)

    Is this the cleanest way to not lose all google benefit?

    Yes, using 301 redirects should be the best route for redirecting old pages to their new pages.

    Thread Starter jumust

    (@jumust)

    Thanks Brad!

    I would say I have hundreds articles….
    So what I should do is manually copy in WordPress post and for each of them use 301 redirect destination url, example:

    Original url : http://www.mysite.com/article/35523/postname
    Destination url : http://www.mysite.com/category/postname

    So does it matter if I install wordpress in the root directory where there is already the old site?

    So what I should do is manually copy in WordPress post and for each of them use 301 redirect destination url, example:

    Yes.

    So does it matter if I install wordpress in the root directory where there is already the old site?

    You can install WordPress anywhere you’d like, but for setup reasons, putting it in the root directory may be the more easy route.

    The problem I see is that you’re going to have is it will be quite tedious to setup 100’s of those 301 redirects.

    Thread Starter jumust

    (@jumust)

    Yes I know,
    it would be quite tedious…
    I don’t really know how to start with php to make it automatic, do you know any tutorial where I can get a basic code and then I’ll try to adapt it with the url structure I have in the old site?

    Thanks

    I may be able to help.

    What I’ll need is a CSV file listing all of your currently URLs. Then, I would need to know the “/category/” that should show for each url.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    jumust – You can do it progamatically via .htaccess and regex if the URLs you’re currently using are in a standard format.

    Moving from domain.com/postname to domain.com/postname can be done by just makign sure you use the permalink value of %postname% on WordPress, and then editing each post to have the same name.

    Basically you’ll have to do it manually and that sucks :/

    Thread Starter jumust

    (@jumust)

    Thanks guys but I need to figure out a bit…

    Brad thanks for your help but since it’s something I’m going to do later on next month I’d like to learn so then I can do it by myself, now I can’t give you any CSV…don’t know yet new categories.
    I’m trying to see if it’s convenient to migrate to WordPress

    Ipstenu I’m not sure if I catch what you say but sounds like I can do it programmatically via .htaccess and regex.

    What I have now in my site is:
    Category url: http://www.domain.com/category.php?id=3#
    Subcategory url: http://www.domain.com/articles.php?subcategory_id=87
    Post url: http://www.domain.com/article/35034
    Page url: http://www.domain.com/page.php?id=about

    I think I’ll use in WordPress custom permalinks:
    /%category%/%postname%/

    I’d appreciate any suggestions

    Thanks

    I tend to do things the hard way. If you created an array of old urls, such as:

    http://www.mysite.com/article/35523/postname
    http://www.mysite.com/article/35524/postname
    http://www.mysite.com/article/35525/postname

    … You could then loop through each link, grab the item after the last / in the url, and then build your new urls. When building the new urls, you would also create 301 redirects that you could place in your .htaccess

    Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html

    The thing is that you’re going to have 100’s of these 301 redirects in your .htaccess, but I don’t think that’ll be a big problem.

    ALSO:

    In a previous post, I found out that WordPress has an automated redirect method built in. What I mean by this is that:

    If your current URL is:
    http://domain.com/category/hello-world

    You could visit any of the following URLS (mis typed urls):
    http://domain.com/blah/hello-world
    http://domain.com/blah/blah/hello-world

    … and it would redirect to the correct post:
    http://domain.com/category/hello-world

    So, technically, if all of your article titles match up exactly on your old site and new site, you may not need to do anything.

    Thread Starter jumust

    (@jumust)

    Great I didn’t know about the built in automated redirect method. It should do the job! And without do anything!!! πŸ™‚
    So if I want to develop the new site and start to insert all articles, where do you suggest to install it to keep the actual site working until the switch to WordPress is ready?

    Should I work on another server and then move everything over to the root of the actual server?

    So if I want to develop the new site and start to insert all articles, where do you suggest to install it to keep the actual site working until the switch to WordPress is ready?

    It really doesn’t matter where you install it. You could try dev.domain.com or domain.com/wordpress or domain.com/dev. The bottom line is that after you design and build your site, you’ll need to follow the steps to move WordPress to another folder (which really isn’t that hard).

    Thread Starter jumust

    (@jumust)

    Ok, my concern is:
    Let’s say I install in the root, my actual site will be down or there will be any conflict?

    If not, let’s any both sites will live together in the root. Once I start to insert all articles with the same name of old ones, users who will visit the actual site will be redirected to the development site, right?

    How to avoid all this?

    You don’t want to install more than one application in the same folder. You can have one website in public_html and one in public_html/wordpress, but you don’t want to have two websites sharing the same parent folder.

    What I would do is:
    1. Keep your current site live in the root
    2. Create your WordPress site in a /dev folder (like domain.com)
    3. Once your WordPress site is live and ready to go, remove all the files for your main site and move the files from /dev into the root folder.
    4. Test test test!

    Be sure that throughout this process you have backups of your site. Don’t delete files in mass without having a backup.

    You may also want to plan to do this change when traffic to your site is at its lowest, for example late in the evening. In this way, you won’t have many visitors seeing the change (or any errors) as it happens.

    Thread Starter jumust

    (@jumust)

    Thanks for all your suggestions.

    One question:
    If I remove all files from the main site, then I’ll lose the old content and how does url redirection work? Users who go to the old url will not be redirected but just will see “Page not found”?

    Sorry for all questions but really I can’t make mistake on the live site

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘Move/Migrate old site to WordPress on same domain – how to 301 redirect’ is closed to new replies.