S
S
Sergey Nizhny Novgorod2016-08-17 15:00:06
Django
Sergey Nizhny Novgorod, 2016-08-17 15:00:06

How to migrate a project from php to django (complex question)?

Hello.
Now I'm finishing testing the project, it's time to roll it out. I would like to clarify a couple of points with you.
There is an old php site with 1000 articles that has good weight and reputation. I need to replace it with a new site on django and transfer the material. How I suppose to do it:
1) I buy a VPS
2) I set everything up on the "left" domain
3) I transfer all the material by hand (which may take a couple of weeks).
4) I register 1000 redirects in nginx from the old url to the new one.
5) Change dns settings for domain - change domain settings in django settings
6) Voila!
I ask you to give your comment about the correctness / incorrectness of my plan.
And there are also a number of secondary questions:
1) What power is needed for a vps to keep a django project with 3500 visitors per day (40 peak hits).
2) Which virtualization is better for django: OpenVZ or XEN, and is there any difference at all?
3) I'm a little afraid that I won't be able to make a normal backup through the console. Is it worth buying ISPmanager lite for this purpose or is it easy?
4) I transferred the entire project through an ftp client by simply copying it with a file. Is there a better way?
5) Is it an adequate option not to take up server resources, and take business mail from mail.ru/yandex?
6) Is there any difference in setting up http/https with django?
Also I will be glad if someone prompts the correct algorithm of actions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2016-08-17
@Terras

Regarding the transfer of content.
It's quite simple and you won't need to carry it with handles. If it is possible to somehow get to the flocks themselves and download everything in a crowd at least in some format, then you can always write a loader in a day or two, since in python it is not so difficult, especially since you will have mapping in your models.
Parse your file (or climb directly into the database), create a model object and fill it and save it, and so on in a loop!
As for redirects, they can also be automated for sure by creating a separate view for this.
Well, now for questions
Basically, anyone will do. The load here is very small.
There isn't much of a difference either. I generally have everything on KVM.
Well, you don't need to be afraid, you can. After all, you will need to backup the database, this is done with just one command, and backup the downloaded files, for this, too, one command is all you need. And you already have the whole project.
Well, most hosters offer backups at the level of the entire virtual machine, use this option.
Version control systems mercurial/git + ssh/scp. And ftp is no longer needed! https://habrahabr.ru/post/113636/
Certainly adequate, much less problems with both mail and spam. At the same time, it is highly desirable to deploy your own local exim / postfix, which will send mail, pretending to be a yandex domain. To do this, you need to configure everything DKMS + SPF a little. The keys can be taken from Yandex itself to your mail domain. This is important if you want to send a lot of mail.
No, especially since nginx or apache will most likely do it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question