拖了一个月终于着手并且完成了。其实没有什么难的。但是因为我对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是傻瓜操作,没有怎么弄?这个我也弄了好半天最终解决了,马上再写一篇单独说吧
好啦好啦,到此结束,路人有问题可以在下面留言~
Looking at the surface design and the substance together this site has both right, and a look at bauxbee reinforced that integrated quality, sites where presentation and content reinforce each other rather than fighting are sites with full editorial coherence and this one has clearly invested in both layers in a balanced way.
Thank you for not assuming the reader already knows everything, the explanations meet me where I am, and a look at coilbliss 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.
Reading this in three sittings because the day was fragmented, and the piece survived the fragmentation, and a stop at cubeasana held up under similar reading conditions, content engineered for continuous attention is fragile in modern conditions and this site reads as durable across the realistic ways people consume content today.
Good post, the kind that respects the reader by getting to the point quickly without skipping the details that matter, and a short look at cotcircle confirmed that approach is consistent across the site which is rare to find online these days, definitely a place I will return to soon.
Reading this triggered a small change in how I think about the topic going forward, and a stop at aerobound reinforced that subtle shift, the rare content that actually moves my thinking rather than just confirming or filling it is the kind I most value and this site is providing that kind of impact today.
Worth saying that the prose reads naturally without straining for style, and a stop at dewcarve maintained the same unforced quality, writing that achieves elegance without effort is the highest tier and this site has clearly worked out how to land that effortless quality consistently rather than only on the writers best days.
This actually answered the question I had been searching for, and after I checked bauxbee I had a few more pieces I had not realised I needed, that is the sign of a site that knows what its readers want before they even know how to ask it which is impressive.
Took me back a step or two on an assumption I had been making, and a stop at burlclip pushed that reconsideration further, writing that gently corrects the reader without being aggressive about it is a rare diplomatic skill and the team here clearly knows how to land critical points without turning readers off.
Top notch writing, every paragraph carries weight and nothing feels like filler, and a stop at coilbliss reflected that same care, a rare thing on the open web these days where most pages exist for clicks rather than actual reader value or anything close to that which is honestly a real shame.
Good post, the kind that respects the reader by getting to the point quickly without skipping the details that matter, and a short look at cotcircle confirmed that approach is consistent across the site which is rare to find online these days, definitely a place I will return to soon.
My usual response to new bookmarks is to forget them but this one I have already returned to twice, and a look at cubeasana pulled me back a third time, the actual return rate to bookmarked sites is the real measure of value and this one is clearing that measure at a notable rate already.
Now considering whether the post would translate well into a different form, and a look at astrebulb suggested similar versatility, content that could move into other media without losing its substance is content that has been built around ideas rather than around format and this site reads as idea first throughout posts.
Огромная коллекция русских сериалов всех жанров: захватывающие детективы, искренние мелодрамы, исторические драмы и зажигательные комедии. Любимые актёры, узнаваемые истории и тёплая атмосфера. Без подписки и регистрации – просто включай и наслаждайся: https://kinogo-serialy-russkie.top/
Just dropping by to say thanks for the effort, it does not go unnoticed when a writer cares this much about the reader, and after I went through bookcliff I was certain this is one of the better corners of the internet for this particular kind of content which is genuinely refreshing.
Picked up a couple of new ideas here that I can actually try out, and after my visit to airycargo I have even more notes saved, this is the kind of resource that pays you back for the time you spend on it which is rare to come across in this corner of the web.
Now wishing more sites covered topics with this level of care, and a look at burlclip extended that wish across more subjects, the rarity of careful coverage on most topics is a problem and this site is one of the small antidotes to that broader pattern of casual or surface treatment of complex subjects.
A memorable post for me on a topic I had thought I was tired of, and a look at dewchase suggested the same site can refresh other tired topics, sites that can revive my interest in subjects I had written off as exhausted are doing rare work and this one is clearly doing that for me today.
Approaching this site through a casual link click and being surprised by what I found, and a look at chordbase 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.
A piece that respected the reader by not over explaining the obvious, and a look at bauxcircle continued that calibrated approach, finding the right level of explanation is one of the harder editorial calls and this site has clearly thought carefully about what readers will already know versus what they need help with consistently.
Started believing the writer knew the topic deeply by about the second paragraph, and a look at astrebulb reinforced that confidence, the speed at which a writer establishes credibility through their writing is a useful quality signal and this writer establishes it quickly and quietly without resorting to credential dropping or self promotion.
Worth pointing out that the writer made the topic feel more interesting than I had been expecting, and a look at airycargo continued that elevation effect, content that improves the apparent quality of its subject through skilled treatment is doing something real and this site has clearly developed that kind of editorial alchemy throughout.
Worth saying that the quiet confidence of the writing is what landed first, and a look at cotcloud continued that quiet quality, confident writing without the loud display of confidence is a rare combination and this site has clearly developed both the knowledge and the editorial restraint to land that combination consistently.
Took a few notes from this post, the points are easy to remember without needing to come back and check, and a look at cultbotany added a couple more, the kind of place that sticks in the memory long after the browser tab has been closed for the day which says a lot really.
Closed and reopened the tab three times before finally finishing, and a stop at bookcliff held my attention straight through, sometimes content fights for time against my own distraction and the times it wins say something positive about its quality and this post clearly won that fight today afternoon for me.
Found something quietly useful here that I expect to return to, and a stop at bauxcircle added more of the same, content with quiet utility ages well in a way that flashy hot takes do not and I have learned to weight quiet utility much higher when deciding what to bookmark for later use.
Now wishing I had found this site sooner, and a look at dewchase extended that mild regret, the calculation of how many years of good content I missed by not finding the right sources earlier is one I try not to make too often but it does come up sometimes when I find sites this good.
Working through this site has been a small antidote to the shallow content that fills most of my reading time, and a stop at coilbyrd extended that antidote function, sites that quietly improve the average quality of my reading by being themselves are sites worth supporting through return visits and recommendations consistently.
Worth flagging that the writing rewarded a second read more than I expected, and a look at cultbotany produced the same second read benefit, content with hidden depths that emerge only on careful rereading is rare in the modern blog space and this site has clearly invested in that level of compositional density throughout.
Generally I bookmark sparingly to avoid building up a bookmark graveyard but this one earned a permanent slot, and a stop at cotcloud extended that permanence designation, the few sites I keep permanent bookmarks for are sites I expect to use repeatedly and this one has clearly cleared that expectation bar today.
Better than the average post on this subject by some distance, and a look at chordbase reinforced that, you can tell within the first paragraph that the writer here actually cares about the topic rather than just covering it for the sake of having something to publish that week or that day.
Spent a few minutes here and came away with a clearer picture of the topic, the writing keeps things simple without dumbing them down, and after a stop at byrdbrig the rest of the points lined up neatly which is something I appreciate when I am short on time and need answers fast.
Honest reaction is that I want to send this to a friend who would benefit from it, and a look at amidbrawn added more material I will pass along too, the impulse to share is the strongest signal I have for content quality and this site is generating that impulse cleanly across multiple posts.
A piece that read smoothly because the writer understood how readers actually move through prose, and a look at astrebull maintained the same reader awareness, writers who think about the reading experience as much as the writing experience produce better work and this site has clearly made that shift in editorial approach.
Glad the writer kept this short rather than padding it out, the points stand on their own without needing extra context, and a look at coilbyrd kept the same approach going, brevity is a sign of confidence in the substance and the team here clearly trusts their content to land without filler.
If I had to defend the time I spend reading independent blogs this site would feature in the defence, and a look at bauxclay reinforced that defensive utility, the ongoing case for non algorithmic reading is one I make to myself periodically and sites like this one provide the actual evidence that supports the case clearly.
Reading this gave me the rare experience of fully agreeing with all the conclusions, and a stop at dewchip continued that agreement pattern, content that aligns with my existing views without seeming designed to do so is just content that happens to be reasonable and this site reads as reasonable rather than ideological mostly.
Found this via a link from another piece I was reading and the click was worth it, and a stop at boomastro extended the value across more material, the open web still rewards clicking through citations when the underlying writers care about each other work and this site clearly belongs to that network.
Skipped lunch to finish reading, which says something, and a stop at byrdbrig kept me at my desk longer than planned, when content beats the lunch impulse the writer has done something genuinely impressive in an attention environment full of immediately satisfying alternatives competing for the same finite block of reader time.
Now planning to share the link with a small group of readers I trust, and a look at amidbrawn suggested more material to share with the same group, recommending content into a curated circle requires confidence in the recommendation and this site is making me confident in those personal recommendations on multiple separate occasions now.
Started reading without much expectation and ended on a high note, and a look at curbcliff continued that arc, content that builds rather than peaks early is a sign of a writer who knows how to structure a piece for sustained reader engagement rather than relying on a strong hook to do all the work.
Now I want to find more sites like this but I suspect they are rare, and a look at covebeck extended that thought, the few sites that meet this quality bar are precious specifically because they are rare and finding others like them is one of the ongoing projects of careful internet curation across the years.
Recommended without hesitation if you care about careful coverage of this topic, and a stop at astrebull 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.
A genuine compliment to the writer for keeping the post focused on what mattered, and a look at bauxclay continued that disciplined focus, focus is a editorial choice that compounds across many small decisions and this site has clearly made those small decisions consistently across what I have read so far this week here.
A piece that respected the reader by not over explaining the obvious, and a look at dewchip continued that calibrated approach, finding the right level of explanation is one of the harder editorial calls and this site has clearly thought carefully about what readers will already know versus what they need help with consistently.
Felt the post had been written without looking over its shoulder, and a look at boomastro continued that confident posture, content written for its own sake rather than against imagined critics has a different quality and this site reads as written from a place of confidence rather than defensive justification of every claim.
Now appreciating that the post did not try to imitate any other style I might recognise, and a stop at curbcliff continued that distinct voice, content with its own register rather than borrowed from elsewhere is content with real authorial presence and this site has clearly developed that presence through what feels like patient editorial work.
The post made the topic feel approachable without making it feel trivial, that is a fine balance, and a stop at covebeck maintained the same balance, finding the middle ground between welcoming and serious is genuinely difficult and the writers here have clearly figured out how to consistently hit it well across many different posts.
Read the extended version: https://sagapaurt.com
Easy to recommend without reservations, the site delivers on every promise it implicitly makes, and a look at amidbull kept that same standard going, the kind of consistency that earns trust over time rather than chasing it through aggressive marketing is what I see here and it is appreciated greatly by this particular reader today.
Справки об инвалидности необходимы для подтверждения статуса и оформления различных социальных услуг. Мы помогаем быстро получить нужные документы, https://spravka-invalid.com/chto-delat-esli-poteryal-spravku-ob-invalidnosti/