As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

[Wordpress] Moving a wordpress installation & purging Joomla

cmsamocmsamo Registered User regular
so, in the words of NASA - "Houston, we have a problem".

I have been asked to look at a website (free of charge, because I am an IT guy) for a club I help run, and the website is somewhat 'fugazi'. For a start, it's Joomla powered, and I am not familiar with Joomla. Let me call it 'mysite' for the purposes of this post. We have two domains, a mysite.com and a mysite.net. If you access the mysite.com site, you get a Japanese 'pen-pal' website. When you open the mysite.net site, it mostly works as required, but you get the same japanese suspect website linked when you access the photo gallery - so I assume the Joomla powered current site has been hacked.

What I've done is install a fresh wordpress installation at www.mysite.net/wordpress/ and totally rebuilt the site from the ground up. I bought an additional domain, mysite.ca, and I redirected that to my wordpress installation. So for now, I have a functioning website at mysite.ca

We are now approaching the 'relaunch' of our website, and I need to work out how the hell to cutover from the old sites to the new site. The desired result is that when a user opens any one of the three URLs, they end up at the wordpress site.

My plan to achieve this is as follows:

(1) Backup wordpress folder to hard drive, and backup databases.
(2) Delete entire contents of the html folder, apart from the wordpress folder (thereby removing all traces of Joomla site, and 'breaking' the current website)
(3) Follow the instructions at this site
(4) Cross fingers and hope that Wordpress still works after the move...

I am not 100% sure on this. Has anyone done this a bunch of times? I also read that there are pitfalls to watch out for when you have content in your wordpress folder because the links will become invalid - but the instructions on that site don't mention anything about that.

I need to get this right first time, as it's a big website launch... And no - this isn't for work. I've built the website in my free time for the club that I am in...

steam_sig.png

Posts

  • Options
    wmelonwmelon Registered User regular
    Personally, I wouldn't follow the instructions on that site. It's really just adding complexity that you'll have to remember or someone else will have to figure out what you did sometime in the future.

    To best answer the rest of your question, I'd really need to know which one of the domains you'd prefer to have as the primary one.

  • Options
    cmsamocmsamo Registered User regular
    Well, the hosting package is on the mysite.net domain, and that's the most publicized domain so it should be that one. The other domains will redirect to it

    steam_sig.png
  • Options
    amateurhouramateurhour One day I'll be professionalhour The woods somewhere in TennesseeRegistered User regular
    If everything is working properly at mysite.ca you should just be able to go to your domain registrar and make sure all of your domain pointers for the .com and .net are going to either mysite.ca or the directory that wordpress is located in.

    Regardless of what's happened to your joomla site I doubt anyone hacked your domain account, it seems like they may have put some malicious code into whatever themes or plugins joomla was using.

    are YOU on the beer list?
  • Options
    cmsamocmsamo Registered User regular
    edited March 2013
    Yes from what I can see the domain accounts are fine. The joomla install and plugins have been compromised.

    The issue is that the Wordpress installation is hosted on the compromised domain: www.mysite.net/Wordpress/

    Mysite.ca is redirecting to mysite.net/Wordpress, so anyone using the .ca URL sees the new site.

    Anyone using mysite.net/Wordpress/ sees the new site. Anyone using mysite.net or mysite.com sees the hacked broken old site.

    Bearing in mind that all the hosting is on mysite.net, how do i repoint the Wordpress installation to the root, so that users accessing mysite.net get to the new site?

    (PS I know that one of the necessary steps is to delete the http folder on the web server, in order to sanitize the Joomla stuff)

    cmsamo on
    steam_sig.png
  • Options
    wmelonwmelon Registered User regular
    ok here's what you'll need to do

    1) login to your wordpress site
    2) Goto Settings > General
    3) Change your site address and wordpress address to your mysite.net url.
    4) delete all of the files in the html directory aside from the wordpress directory.
    5) move all files from the wordpress directory to the html directory.
    6) change the .com and .ca domains to redirect to the .net domain
    7) Test your site.

    If you find you've got images and other urls in posts still pointing at the .ca address. I can recommend a plugin that will let you update those.

  • Options
    cmsamocmsamo Registered User regular
    Thanks! I think I'm good URL because the Wordpress install was built on the mysite.net domain, so everything is pointing at that, I think!

    So for my own understanding, when I change those two URLs in the settings, Wordpress updates all content and files to the new file path (i.e. the root) - what about pemalinks?

    steam_sig.png
  • Options
    baudattitudebaudattitude Registered User regular
    Wouldn't hurt to run this against your new install as well:

    http://wordpress.org/extend/plugins/timthumb-vulnerability-scanner/

    From what little I've heard about wordpress security issues, there were a lot of very popular themes that incorporated an image resizer that made it very easy to upload and execute a back door.

  • Options
    amateurhouramateurhour One day I'll be professionalhour The woods somewhere in TennesseeRegistered User regular
    Also, if you're going to stick with wordpress, unless you're paying a firm to design a theme from you from the ground up don't use anything other than the themes on the wordpress site itself. All of those "free theme" sites that aren't related to wordpress are just filled with themes and plugins that have all kinds of nasty shit on them.

    are YOU on the beer list?
  • Options
    cmsamocmsamo Registered User regular
    Thanks all for the advice. Monday night is cutover day... Wish me luck!

    steam_sig.png
  • Options
    cmsamocmsamo Registered User regular
    wmelon wrote: »
    ok here's what you'll need to do

    1) login to your wordpress site
    2) Goto Settings > General
    3) Change your site address and wordpress address to your mysite.net url.
    4) delete all of the files in the html directory aside from the wordpress directory.
    5) move all files from the wordpress directory to the html directory.
    6) change the .com and .ca domains to redirect to the .net domain
    7) Test your site.

    If you find you've got images and other urls in posts still pointing at the .ca address. I can recommend a plugin that will let you update those.

    What are the recovery steps in case I mess this up? ;)

    steam_sig.png
  • Options
    wmelonwmelon Registered User regular
    Recovery isn't too complicated.

    1) start with copying all your files back to the original places
    2) goto mysite.ca/wp-admin/options.php and login with your admin login
    3) edit Home and Site URL to have the correct url.
    4) Save your options.
    5) View the site.

  • Options
    cmsamocmsamo Registered User regular
    Great... Thanks!

    steam_sig.png
Sign In or Register to comment.