拖了一个月终于着手并且完成了。其实没有什么难的。但是因为我对Linux的了解非常局限,还是花了一番功夫,同时学了很多东西,在这里记一下。没有试图写一篇“手把手教你搬WP”,只是记录一些我觉得有帮助的东西,希望做同样的事情的且同样不是那么牛逼的Linux学习者们有用:)
虽说是WordPress搬家,但是任何一个小型网站搬家都差不多这样了吧,嘿嘿。
如果用cPanel和MySQLAdmin之类的东西可能就很傻瓜,但是第一cPanel太贵了(竟然要425多刀一年,我都笑了),第二VPS都买了必须必须要抓住每一个学Linux的机会啊。
过程如下(断断续续弄了好几天…):
环境
虚拟主机和VPS都是host2ez的,最牛逼的主机提供商。系统是CentOS Linux 5.6,apache(现在改名叫httpd)已经装好了,再装
yum php mysql mysql-server
就成。
文件
这个简单,cPanel把虚拟主机上文件打包,VPS上wget下来就好。WP的独立性做的好,文件路径改变不会有什么问题。备份用的插件BackUpWordpress倒因为出问题了,不能识别路径,我直接禁用掉了,VPS嘛马上弄个备份方案还不容易,不需要用WP的插件了。在[wordpress path]/wp_config.php里把信息改一下,数据库部分的怎么改见下面。
数据库
对数据库命令不了解的同学建议先看一下mysql的教程。我不能把所有操作都写出来…这次弄这个还学了不少数据库的东西…tutorial很容易搜到,我觉得有一个比较好的命令列表点 这里,里面包括了所有常用的命令。
在虚拟主机的cPanel – mysqladmin里备份出.sql文件,传上VPS,导入文件的命令是
mysql – u user_name -p database_name < file_name.sql
很多地方写的-p后面跟密码,我用的版本-p后面不跟东西,回车以后才提示输密码,可能是新版本不提倡显式输入密码了吧。非要用的话就–password=”xxxxxx”
如果你导出文件选的是整个mysql,需要打开文件把database”information_schema”部分删掉,否则会失败,这个db貌似是mysql自己的,不能改..不懂
之后要建立一个用户并给此用户分配使用相应db的权限,虽然我们也可以直接把root用户写进wp_config.php但是稍微有点安全意识的程序员都不会想要这么做的…虽然权限没什么大不了的,但是名字叫root就是不行! 所以进数据库:
mysql -u root -p
进去以后添加用户:
mysql> create user 'username'@'localhost' identified by 'mypass';
分配权限:
mysql> grant all privileges on databasename.* to username@localhost; mysql> flush privileges;
然后就把这个用户甩给Wordpress啦(编辑wp_config.php)
测试的时候有一些问题
上面完了就能http进vps的ip看到博客了,但是不要去点任何东西…因为数据库里“本站”的地址还是原来的域名,这样如果你原来的网站还开着那么随便点个链接就进到原来网站了,如果没开那就can’t find page啦。
而且因为没法进后台改,所以只好进mysql改了
mysql> use viaxlcom_viaxlcom; mysql> select * from wp_options where option_value rlike "^http"; +-----------+---------+-------------+----------------------------+----------+| option_id | blog_id | option_name | option_value | autoload | +-----------+---------+-------------+----------------------------+----------+ | 2 | 0 | siteurl | http://axlarts.com/blog | yes | | 39 | 0 | home | http://axlarts.com | yes | | 41 | 0 | ping_sites | http://rpc.pingomatic.com/ | yes | +-----------+---------+-------------+----------------------------+----------+ 3 rows in set (0.06 sec) update wp_options set option_value="http://12.34.56.78/blog" where option_id=2; update wp_options set option_value="http://12.34.56.78" where option_id=39;
这样就把VPS上的网站地址改成本身的IP了。
————————————-
另外我发现一些插件会出现权限问题,比如JW player(放flv视频用的插件),没法启用插件因为提示不能写目录,我整个www目录都是755权限,设置成777以后可以开启了,然后再弄回来。这个问题解决了但是原因一直不知道,直到我因为另一个问题搜了一下才搞明白。
另一个问题是:更新插件update的时候会提示我输入ftp帐号,以前没这事啊,于是我就去装了个vsftpd(ftp的服务端),设置好能更新了,但是为什么?后来搜到这篇文章 <Auto Update WordPress Without FTP> 解决了ftp的问题并且意识到上面的问题也和这个有关系,即因为目录的owner不是httpd,所以网站脚本没有对文件操作的权限。
/var/www目录的owner要设置成httpd的运行者(可以用ps aux或者top命令查看),可能是www,apache或者nobody或者其他的。我的是apache,所以在chown apache:apache /var/www -R之后update就不用输ftp了,我立刻关了vsftpd依然ok,可见之前是绕了弯子了,没权限还用ftp操作文件…
绑域名
进godaddy面板直接改A地址就好了,没有别的要操作的。
但是因为我本来虚拟主机上就放了两个网站,所以怎么在一个VPS上绑定多个域名多个网站?之前用cPanel是傻瓜操作,没有怎么弄?这个我也弄了好半天最终解决了,马上再写一篇单独说吧
好啦好啦,到此结束,路人有问题可以在下面留言~
Felt the post had been quietly polished rather than aggressively styled, and a look at heronbobcat confirmed the same understated polish, sites whose quality reveals itself slowly rather than announcing itself loudly are the kind I trust more deeply because the trust is not based on first impressions of marketing but actual substance.
Thank you for not assuming the reader already knows everything, the explanations meet me where I am, and a look at kaitori-gk did the same, that consideration is what makes a site feel welcoming rather than gatekeepy which is sadly the default mood across the modern web today for most subjects covered.
Really grateful for content like this, it does not waste my time and it does not insult my intelligence either, and a quick look at tzxc3342 was the same, balanced respectful writing that makes a person feel welcome rather than rushed through pages of forced engagement just to keep clicking around.
Решил проблему только когда наткнулся — как выбрать реально работающий способ для перевода денег за границу онлайн. Случайно набрел на годный материал: международные платежи https://mezhdunarodnye-platezhi-kap.ru Короче, если по факту — курс конвертации часто занижают. Ну сами подумайте любой подобный трансграничный платёж — это реальная финансовая лотерея. Обратите внимание, многие не в курсе — перед финальным подтверждением сравните эффективный курс. Иначе легко потерять приличную сумму. Моё мнение — лучше один раз изучить тему перед любой отправкой.
Came away with some new perspectives I had not considered before, and after adverba those ideas felt more complete, the kind of content that stays with you a little while after reading rather than slipping out the moment you switch tabs and move on with your day to whatever comes next.
Worth recognising that the post handled a familiar topic without reaching for any of the obvious hot takes, and a stop at kaitori-hk continued that fresh treatment, sites that find new angles on subjects others have exhausted are sites worth following carefully and this one has clearly developed that exploratory instinct through patient practice.
Now thinking about how to apply some of this to a project I have been planning, and a look at 54xx54 added more material for the planning, content that connects to my actual creative work rather than just being interesting in the abstract is the kind that earns priority placement in my reading rotation consistently going forward.
aviator 1win http://1win95031.help/
mostbet приложение скачать Кыргызстан http://www.mostbet70131.online
Thanks for treating the topic with the seriousness it deserves without becoming pompous about it, and a stop at 87tv continued that balanced treatment, the gap between earnest and self serious is huge and writers who can stay on the right side of it earn my respect when I find them online today.
Looking through the archives suggests this site has been doing this for a while at this level, and a look at minicreditosnuevos confirmed the long term consistency, sites that have maintained quality across years rather than just a recent stretch are sites with serious editorial discipline and this one has clearly been at it for a while.
A relief to read something where I did not have to fact check every claim mentally, and a look at dgeg continued that reliable feeling, sites where I can lower my guard and trust the content are rare and this one is earning that trust paragraph by paragraph through consistent careful work behind the scenes.
Took the time to read every paragraph rather than skimming for the punchline, and a quick visit to ufobet88 earned the same careful attention from me, that is the highest signal I can give about content quality because my default mode is rapid scanning rather than deliberate reading on most pages.
Generally my attention drifts on long posts but this one held it through the end, and a stop at beetledune earned the same sustained focus, content that defeats my drift tendency is content with substantive pulling power and this site has demonstrated that pulling power across multiple pieces in a session that has now run quite long actually.
Probably going to mention this site in a write up I am working on later this month, and a stop at adobebronze provided more material for that potential mention, content worth referencing in my own published work rather than just personal reading is content with the highest endorsement level and this site has earned that endorsement.
мостбет aviator стратегия https://www.mostbet70131.online
During the time spent here I noticed the absence of the usual distractions, and a stop at americahtml extended that distraction free experience, content that does not fight my attention with pop ups and modals and aggressive prompts is content that respects me and this site has clearly chosen the respectful approach throughout.
Adding this site to my regular reading list, the post earned that on its own, and a quick stop at ghewr sealed the decision, the kind of place worth checking back with from time to time because it consistently produces material that holds up against a critical reading too which I really value.
Strong recommendation from me, anyone curious about the topic should make time for this, and a look at airmailsa only sharpens that recommendation further, the kind of resource that holds up against careful scrutiny rather than crumbling at the first critical question is rare and worth pointing other people toward when the topic comes up.
However measured this site clears the bar I set for sites I take seriously, and a stop at wbsaoabb continued clearing that bar, the metrics I use for site quality are admittedly informal but they are consistent and this site has cleared them on multiple measurements across multiple visits which is meaningful for my evaluation.
Слушайте, вот уже который раз убеждаюсь — как выбрать реально работающий способ для платежей за рубежом. Вот здесь всё по полочкам расписано: прием оплаты из-за рубежа https://mezhdunarodnye-platezhi-kap.ru Самое главное, что я вынес — не все способы одинаково прозрачны. Ну сами подумайте любой очередной международный перевод — это реальная финансовая лотерея. И да, кстати — до любой операции с валютой проверьте все комиссии до копейки. В противном случае легко потерять приличную сумму. Моё мнение — лучше один раз изучить тему перед любой отправкой.
Just nice to read something that does not feel like it was assembled from a content brief, and a stop at coyotederby kept that handcrafted feel going, you can tell when a real human with real understanding is behind the words versus a templated piece churned out for an algorithm to find.
Решил проблему только когда наткнулся — где условия адекватные, а не грабёж для платежей за рубежом. Товарищ скинул ссылку на нормальный разбор: перевод денег за границу перевод денег за границу Суть вот в чём — скрытые платежи всплывают в последний момент. Ну сами подумайте любой очередной международный перевод — это постоянный риск переплатить. И да, кстати — до любой операции с валютой проверьте все комиссии до копейки. В противном случае легко остаться в минусе только на конвертации. Моё мнение — стоит разобраться заранее перед любой отправкой.
Bookmark moved to my permanent reference folder rather than the casual maybe later folder, and a look at balconesa earned the same upgrade, the distinction between casual interest and lasting reference is something I track carefully and very few sites cross that threshold but this one did so without much effort apparently.
Thanks for sharing this with the open internet rather than locking it behind a paywall like so many sites do now, and a stop at adverba kept the same vibe going, generous helpful and clearly written by someone who actually wants people to learn from it rather than just charge them.
Now thinking about how to apply some of this to a project I have been planning, and a look at collothuna added more material for the planning, content that connects to my actual creative work rather than just being interesting in the abstract is the kind that earns priority placement in my reading rotation consistently going forward.
Reading this prompted a small note in my reference file, and a stop at dgeg prompted another, the rare site that contributes useful nuggets to my own working knowledge rather than just consuming my attention is worth the time investment many times over compared to the usual pile of forgettable scroll content.
Thanks for the readable length, I finished it without checking how much was left, and a stop at ufobet88 kept me reading the same way, when I stop noticing the length of a piece because the content is engaging enough to sustain attention without willpower the writer has done their job well today.
Нашёл интересный материал по этому вопросу — какой способ действительно работает для международных транзакций. Нашёл подробный анализ ситуации: международный платежный агент https://mezhdunarodnye-platezhi-fra.ru Основной вывод, который я сделал — курс конвертации может существенно отличаться. Стоит учитывать, что любой перевод за границу онлайн — связан с разными типами комиссий. Дополнительная информация — перед подтверждением перевода рекомендуется сравнить несколько вариантов. В противном случае можно переплатить из-за невыгодного курса. Резюмируя — лучше заранее разобраться в вопросе перед любой отправкой средств.
Felt the writer respected me as a reader without making a show of doing so, and a look at 2hays continued that quiet respect, this is the kind of small but meaningful detail that separates the sites I bookmark from the ones I close after a single skim and never return to again no matter how interesting the headline.
Appreciated how the writer anticipated the questions a reader might have along the way, and a stop at americahtml continued that thoughtful approach, you can tell when content has been edited with the reader in mind versus just published as a first draft and this is clearly the former approach across what I read.
One of the more thoughtful posts I have read recently on this topic, and a stop at appliquea added even more weight to that impression, this is genuinely good content that holds its own against far better known sites in the same space without trying to imitate any of them at all which I appreciate.
Solid value for anyone willing to read carefully, and a look at collothuna extends that value across the rest of the site, this is the kind of place that rewards return visits rather than offering everything in a single splashy post and then leaving readers nothing to come back for later which is unfortunately common.
This one is staying open in a tab for the rest of the day so I can come back and re read certain parts, and a look at tzxc3342 suggests I will be doing the same with a few more pages here too, this is going to be a deep dive over the coming hours.
Worth recognising that this site does not chase the daily news cycle, and a stop at velegele confirmed the longer publication arc, sites that resist the pressure to comment on every passing event are sites with genuine editorial discipline and this one has clearly chosen depth over volume which I respect deeply.
Now adding the writer to a small mental list of voices I want to follow, and a look at coyotederby reinforced that follow intention, the few writers whose work I actively track are writers who have demonstrated sustained quality and this writer has clearly demonstrated that sustained quality across the pieces I have sampled here today.
Worth observing that the post landed without needing a flashy headline to hook attention, and a stop at haloku69 did the same, content that earns engagement through substance rather than packaging is the kind I trust more deeply and this site has clearly chosen substance as the primary lever for reader engagement throughout.
Approaching this site through a casual link click and being surprised by what I found, and a look at agammaglobulinemiaa extended the surprise, the rare experience of stumbling into excellent independent content rather than predictable mediocrity is one of the actual remaining pleasures of casual web browsing and this site provided it cleanly.
J’ai testé plusieurs plateformes sans grand succès. Je n’arrivais pas à trouver la version officielle sur le Play Store. Finalement, j’ai pris le temps d’analyser tous les détails techniques. J’ai finalement déniché la bonne source et je voulais vous partager tous les détails, vous pouvez consulter les informations à jour ici: xbet apk xbet apk. Bref, ce que je voulais vous dire — l’appli tourne parfaitement bien sur mon téléphone.
l’installation était rapide et simple, pas de tracas. Je vous parle de mon expérience personnelle — ne perdez plus votre temps avec d’autres sites. Bonne chance à tous…
Ça faisait un moment que je voulais tester cette plateforme. Télécharger un fichier fiable devenait vraiment compliqué. J’ai vérifié les dernières mises à jour pour lancer le processus sans erreur. J’ai finalement déniché la bonne source et je voulais vous partager tous les détails, vous pouvez consulter les informations à jour ici: 1xbet download 1xbet download. Bref, ce que je voulais vous dire — la dernière version est super fluide et intuitive.
Je n’ai rencontré aucun problème lors du téléchargement. Pour être honnête, c’est la plus stable que j’ai testée — ne perdez plus votre temps avec d’autres sites. Je vous souhaite plein de réussite et de bons gains…
I appreciate the clarity here, everything is explained in simple terms without unnecessary detail, and after a quick stop at 2hays the points came together nicely for me, the writing keeps things straightforward and respects the reader from start to finish without ever talking down to anyone.
Recommended without hesitation if you care about careful coverage of this topic, and a stop at balconesa reinforced the recommendation, the bar I set for unhesitating recommendations is fairly high and this site has cleared it through the cumulative weight of multiple consistently good pieces rather than through any single standout post which is meaningful.
Well done, the writing is professional without being stiff, and the topic is treated with care, and a look at airmailsa reflected that approach, the kind of site I would point a colleague to if they asked for a reliable starting point on this topic in the future without any hesitation at all.
Yesterday I was complaining about the state of online writing and today this site has temporarily fixed that complaint, and a look at heronfjord extended that mood reversal, the short term mood improvement that comes from finding good content is real and this site has produced that improvement for me at a useful moment.
Нашёл интересный материал по этому вопросу — как правильно организовать процесс для международных платежей. Товарищ скинул ссылку на качественный разбор: перевод средств за границу https://mezhdunarodnye-platezhi-fra.ru Суть в следующем — банковские комиссии сильно различаются. Стоит учитывать, что любой международный перевод — имеет свои нюансы в зависимости от выбранного способа. Дополнительная информация — до проведения операции рекомендуется сравнить несколько вариантов. Без этого можно переплатить из-за невыгодного курса. Резюмируя — лучше заранее разобраться в вопросе перед любой отправкой средств.
A piece that read as the work of someone who reads carefully themselves, and a look at airtighta continued that informed feel, writers who are also serious readers produce work with a different quality and this site reads as the product of someone steeped in good writing rather than just generating content for an audience.
Je cherchais une application mobile de qualité pour mes paris. Je n’arrivais pas à mettre la main sur la version officielle. J’ai vérifié les dernières mises à jour pour lancer le processus sans erreur. J’ai finalement trouvé la bonne source et je voulais vous partager tous les détails, vous pouvez consulter les informations à jour ici: telecharger 1xbet telecharger 1xbet. Voilà, pour être clair net et précis — la dernière version est hyper fluide et agréable à utiliser.
les mises à jour se font toutes seules sans intervention. Je vous fais part de mon retour d’expérience — croyez-moi, vous ne le regretterez pas, tentez le coup. Bonne chance à toutes et tous…
Quietly the post solved something I had been turning over without quite knowing how to phrase the question, and a look at wbsaoabb extended that quiet solving, content that addresses unformulated needs is content with reader insight and this site has demonstrated that insight at a high rate across the pieces I have read recently.
mostbet поддержка Кыргызстан http://mostbet11528.online
Nice to see a post that does not try to overcomplicate the basics for the sake of looking smart, and once I looked at velegele the same direct tone was there too, which honestly makes a difference when you are short on time and want answers without long pointless intros.