Categories
Tech

Opalstack Review – Experiences of the PHP guy

If you have followed this page earlier you know that I’m pretty satisfied user of Opalstack services. In this post I’ll provide more insight of Opalstack features. My point here is to get people to know about Opalstack and their way of hosting and therefore get all hosting providers to provide better plans.

Differences between providers

When speaking about Opalstack and web hosting we first need to look at others a bit. As I have history with Webfaction, I have browsed tsohost’s pricing multiple times.

This is how tso sees it. Affordable price, a free domain name (for the first year, a free SSL certificate for the first year and some strange migrations)

Tsohosting is just one player. There are multiple big players in the industry. Bluehost, Hostgator … There’re so many but they seem to share similar things related to pricing. At the front page they’re quite cheap. But then when you dig deeper and would actually want to use hosting for something, the bill starts to grow. It won’t be enourmous, of course, but relatively high compared to starting price.

So there you are. Webfaction was the first hosting provider (that I knew) who offered just piece of machine to you and you can do whatever (practically) you want with it. Always the same cost. Except when you need services that cause costs to provider, e.g. dedicated IPs etc. Additional cost in those cases are understandable.

Opalstack is Webfaction 2.0 in this sense. Basically the same idea. You can host a fleet for your small+mid sized websites and everything with the same cost. You can host large websites as well but there I wouldn’t probably go with shared hosting even though it would be possible. And hopefully you’re not running a fleet of large sites 🙂

512MB RAM 50GB SSD 500GB Bandwidth is Opalstack Valuestack oneliner. No need to put long pricing pages there. That’s what you have. And by the way: if you’re using shared apache (for example traditional PHP sites are hosted this way), memory is not calculated against you.

Need more space? You can buy it. Only memory, space and bandwidth are things that you need to pay for. Other than that just happens.

It’s more than just pricing

We all have contacted customer service in some hosting company before. We had to ask dedicated IP or SSL certificate or something else. Often those experiences are quite bad. Customer service is not enabling you but disabling. Everything is hard with them.

Opalstack goes in the exact opposite direction. They try to help you even when you have made the mistake yourself. They share tips on their forum and are very active there. It’s not that kind of forum where angry customers are yelling but company reps are not there. Nowadays I always check the forums first. What kind of service you can expect to have if you are their customer. Here’s example from Opalstack Community.

Capabilities are great

Do you need to run WordPress? They got you covered. You can choose over different PHP versions so if your plugins need certain version, it’s of course setting in the dashboard.

If you’re finding a place to host WordPress, please look at this post I made earlier. And maybe this as well.

Want to do something with Python? You can do it of course. They have quite well put instructions to things.

Do you have Java solution, modern or legacy? Yes, you can serve it from Opalstack without help from customer service. Just tell the Opalstack system that you need a free port where you’ll be hosting your service and that’s it. Here is example of a need to run Java program.

Want to run software done with dotnet core? And of course you can do it. Go? Node? Rust? Yes. They all are supported. See all features here.

That’s the idea here. There’s no limitations but only enablement.

Is Opalstack for me?

If you wonder if Opalstack would be a right choice for you, I have good news. They have 14 days fully functioning trial. Test it. Enjoy full shell access that so many times are missing from other competitors. Host your and your friends stuff on there. Because why not, it won’t cost you extra.

I haven’t found anything better available to this day. That’s why I’m acting as a Opalstack evangelist here. Because I want them to set the bar high so that others must follow. And this kind of pricing models and user enablement would be the standard practice in the future.

Until then, I keep using Opalstack.

Categories
Tech

How to Change WordPress Domain

When you want to e.g. publish your WordPress driven development site you probably need to change domain settings in WordPress. It’s not hard at all when you prepare a bit and know what you’re doing.

Too many posts in the internet just says that “go to admin panel and change site url”. Then it should work. Sometimes I wonder how much of testing have those people with this kind of instructions done before writing it down 🙂

So what you need to do?

  1. Get your WordPress to new server (if needed). You can follow these instructions I have written down earlier.
  2. It’s important that new domain is directed to this server (DNS).
  3. If your new server has WP-CLI available, use it.
$ wp search-replace 'http://example.old' 'http://example.new' --skip-columns=guid

4. It works. It’s actually a lot easier than many other possibilities. And it takes care all the serialized data in the same time.

If you don’t have WP-CLI available, check Moving WordPress from codex for other options. Just keep in mind that just changing SITE_* constants are not enough but you need to search and replace database.

I’m yet to understand why WordPress stores so eagerly absolute paths to database but it really does so often. It would make a lot more sense to use just relative URLs to everything but maybe there’s something related to multiuser wordpresses that makes sense. However, I don’t understand it.

I run my WordPress and Woocommerce sites proudly in Opalstack shared hosting provider. A lot of ex-Webfaction clients have moved to Opalstack and they’ve experience quite a growth. You may want to check it out.

Categories
Tech

Migrate WordPress from Webfaction to New Hosting

Many of us are migrating away from Webfaction. In earlier post, I wrote about my new favorite alternative hosting service Opalstack. In this post I’ll give you an overview how to migrate WordPress from Webfaction to Opalstack.

What’s Opalstack?

Opalstack is Webfaction -like shared hosting provider (also VPS provider). If you’re familiar with Webfaction you will feel at home in the first second at Opalstack. It’s actually run by people who have left Webfaction.

Migrate WordPress from Webfaction

Basically all WordPress installations that do not contain any magic or crazy stuff will go with the same flow. If you’re moving your own site, this is basically what you need to do. If you’ve bigger site that is probably developed by some software vendor, let them do the work.

First: Create tarballs and dump the database.

It’s time to ssh to webfaction. First, dump your relevant database.

mysqldump -u [db_user] -p [databasename] > ~/db.sql

It will ask your password after that. In case you need fancier dump, you can always look for more sophisticated options. After running that command you’ll find db.sql containing dump of the whole database in your home directory.

Then, let’s create tarball of the wordpress site’s files. It will contain all code and all media files. Note that if you have such directory setup that is not following the default approach you may need to alter this phase a bit.

tar cvf ~/site.tar ~/webapps/[your-wordpress-site]

It will create a file to your home directory (called site.tar). It shouldn’t take too long.

Second: Create Apps and Databases at Opalstack

Login to Opalstack control panel at my.opalstack.com. Create a new app. Don’t create a WordPress app but just PHP-FPM Apache app. That’s important as we don’t want to get new wordpress site up but move your old one to Opalstack.

As always, I recommend creating a new user for each WordPress related app in Opalstack. It’s easy and it will limit damages if your WordPress gets hacked.

Next step: Create a MariaDB database and database user (user is created automagically if you want to). Note that all the default passwords etc. can be found from Notices at the left sidebar.

Add domains (probably a test one? Or if you’re feeling lucky, just your production ones). Add routes. I’m not explaining this more deeply as you’re from Webfaction and the concept is exactly the same (except naming).

Either change existing DNS entries to point to Opalstack or add a new A record for a subdomain (like test.yourdomain.com) which points to Opalstack.

At this point we should be able to go to your new application sitting in the domain you already set up. There should be only white screen or error page. But it should resolve alright!

Third: Install WordPress from Webfaction to Opalstack

Then it’s time to load data from Webfaction to Opalstack. Open ssh terminal to Opalstack, go to your home directory and fetch data.

> scp [email protected]:db.sql .

> scp [email protected]:site.tar .

Now you got your data from Webfaction to Opalstack. Then let’s load it up. First database:

mysql -u [db_username] -p [databasename] < db.sql

Don’t worry it saying mysql even though its MariaDB that Opalstack is using. They’re 100% compatible in our case.

Then, lets go with the tarball. Extracting it:

cd ~/apps/yournewapp
tar xvf ~/site.tar 

If you happen to have too much directory structure after that (so that your site files are found in ~/apps/yournewapp/oldapp/), just go to oldapp directory and say

mv * ..

You probably need to check that it also moves all dot-files, so after that check

ls -la

And if any dotfiles are there (usually .htaccess), move it also

mv .htaccess ..

Now we have data in place. Go back to your apps root folder. Edit wp-config with your favorite editor (I prefer vim) to update database connection credentials.

Also, if you’re testing your site with a new domain, check your options from wordpress documentation.

That’s pretty much it! Try to login, test that everything works.

Oh noes, my site behaves weirdly or just shows source code

Fear not. They’ve used a bit different methodology in Webfaction than they use in Opalstack and if you’re running old site you’ve probably added SetHandler directives into your .htaccess to choose right php version to use.

In Opalstack you choose php version from the control panel. Just delete segments regarding that SetHandler and it should fix the problem.

If not, you can always post question to community forum which is very helpful or send directly email to support. They answer very.. very fast!

Summary

It was quite much of text but action itself is quite straight forward. Try this methodology over those wanky migration plugins that will cause you more headache than give you benefits.