Categories
Code Personal projects

Why I moved my hosting from shared to VPS?

My situation

I was a tenant on a larger server. I was suffering a lot of outages which for my US readers was an issue. In addition the package I was on, limited my access to the server, so I could not add php code(Server side programming language) which limited the usability of the domain.

The VPS hosting provider

I had a few choices before I made the move do I do a windows environment, or Linux. I was on a windows provider and I did not see a reason to justify the cost of windows server license. Also I did not really see any benefits vs Ubuntu server LTS(which is what I am using now). The VPS host, I had used both Linode and DigitalOcean before I was more impressed by both. I chose DigitalOcean since I preferred its choice in servers, and configurations. Both offer SSD servers at reasonable prices. They can also allow me to easily add more servers if I need them in the future.

Worth it?

Hell yes!, I have full control over the server, so if I want to turn one into a game server at any time I can. I can easily run all the applications I want(Email murmur). It makes me much more flexible.

 

Is it for you?

Hard to say. If you are familiar with Linux and servers then probably, if not you will get very confused since the learning curve for server is sharp. I would recommend getting a raspberry pi loading Ubuntu server and seeing if you can run WordPress on it before you start paying for a VPS. In addition hold onto the old hosting provider for emails since setting up emails on a server can be a massive issue. Since there are many pitfalls like ip blocking which you can run into.

In the end it all down to personal preference.

 

Categories
Code Help Personal projects

Common mistakes and solutions when setting up WordPress

The move from, shared hosting to personal VPS and the issues associated.

 

I moved the blog.alexcollie.com over to a personal VPS, which allowed for a greater deal of customisation.

However I was plagued  with issues. Like the php code not being able to modify the WordPress files. All of these challenges are simply solved, but do take a lot of googling.

Common mistakes I made

This error with trying to connect Jetpack

jetpack Please contact your hosting provider to enable PHP’s XML extension.

It seemed like no one else had suffered the same issue.

The solution was really easy just do.(php 7 code)

apt install php-xml

or depending on apt version

apt-get install php-xml

Every time you try and install a or plugin or upload an image or post it said

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

This was a permissions issue were the php code did not have the rights to modify any of the files. Again it a really easy fix

chown -Rf www-data.www-data /var/www/html/

Just change ‘html’ to where the WordPress file is located.

I can think this page for this solution

 

When I tried to crop img inside WordPress it could run into errors.

sudo apt-get install php-gd

or

sudo apt install php-gd

This adds a library which allows php to crop images.

 

Despite all of these errors. Linux/GNU is amazing.

 

 

Categories
News

New Site

New Site New Blog

I have finally moved over to a WordPress based blog, rather than a HTML page which I had to create each time.

I will migrate all of the other posts over to the new format and the look of the page might change, but the blog.alexcollie.com will remain where all my blog posts go.

www.alexcollie.com will remain for my portfolio and other larger projects.

 

Expect many more posts. Since it much easier for me to post here.

Please subscribe to my blog.