Geek Stuff – WebHostFace Hosting & Design Blog https://www.webhostface.com/blog Professional hosting advises, New Website Launch & Design Ideas Thu, 11 Feb 2021 13:37:54 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.4 https://www.webhostface.com/blog/wp-content/uploads/2019/06/cropped-icon-600600-32x32.png Geek Stuff – WebHostFace Hosting & Design Blog https://www.webhostface.com/blog 32 32 Laravel 8 – Review and Hosting services https://www.webhostface.com/blog/laravel-8-review-and-hosting-services/ https://www.webhostface.com/blog/laravel-8-review-and-hosting-services/#respond Thu, 11 Feb 2021 13:36:34 +0000 https://www.webhostface.com/blog/?p=4773 Laravel 8 is finally released and here are some of the many goodies we look forward to: Jetstream, Tailwind, Livewire Laravel Jetstream & Livewire Laravel Jetstream is is a beautifully designed open-source package with application scaffolding. It works by providing the perfect starting point for your next project and includes simplistic yet recognizable dynamic interfaces […]

The post Laravel 8 – Review and Hosting services appeared first on WebHostFace Hosting & Design Blog.

]]>
Laravel 8 is finally released and here are some of the many goodies we look forward to: Jetstream, Tailwind, Livewire

Laravel Jetstream & Livewire

Laravel Jetstream is is a beautifully designed open-source package with application scaffolding.

It works by providing the perfect starting point for your next project and includes simplistic yet recognizable dynamic interfaces via Livewire such as login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum.

Laravel Jetstream is not only designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding it also replaces and improves upon the legacy authentication UI scaffolding available for previous versions of Laravel.

Routing Namespace Updates

In previous releases of Laravel, the RouteServiceProvider contained a $namespace property.

protected $namespace = ‘App\Http\Controllers’;

In Laravel 8.x, this property is null by default meaning that no automatic namespace prefixing will be done by Laravel.

This hard-coded value will be removed so that you have full control over namespaces, this will not affect the upgrade process.

Artisan serve Improvements

As we all know artisan is the backbone of any Laravel application with the newest update it has been tweaked, before after a serve command had to be manually stopped and restarted while now it has been improved with automatic reloading when environment variable changes are detected within your local .env file.

Tailwind Pagination Views

With the highly customization based and low-level framework TailwindCSS you would get all the building blocks needed to set designs without the annoyance of sweating to overwrite existing styles.

Now it is set to be the Laravel8x default paginator, with of course keeping the bootstrap 3 and 4 available to use.

In retrospect, Laravel 8 has fantastic new features and our team is looking forward to properly interact with all of them as benefiting from them can only make the work and build easier.

Laravel 8 Hosting

We are big fans of the Laravel hosting for quite some time and even some of our developers use the Laravel platform for their own project quite often. We have some good knowledge of the good practices that are needed in order to host a Laravel project. You can rely on our professional assistance and our Laravel Hosting services for your new project. We are confident you will like the environment and services we offer for Laravel Developers.

The post Laravel 8 – Review and Hosting services appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/laravel-8-review-and-hosting-services/feed/ 0
Premium malware scanning tool – WebHostFace Protection and Detection https://www.webhostface.com/blog/whf-protection-and-detection/ https://www.webhostface.com/blog/whf-protection-and-detection/#respond Fri, 03 Apr 2020 10:52:53 +0000 https://www.webhostface.com/blog/?p=4698 Website security is a must nowadays. Having a vulnerable or hacked website can ruin your online project in a matter of minutes. Both your users and Google are strictly monitoring for vulnerable or hacked websites and report them with the light of speed. Is there a website platform that is most vulnerable some may ask? […]

The post Premium malware scanning tool – WebHostFace Protection and Detection appeared first on WebHostFace Hosting & Design Blog.

]]>
Website security is a must nowadays. Having a vulnerable or hacked website can ruin your online project in a matter of minutes. Both your users and Google are strictly monitoring for vulnerable or hacked websites and report them with the light of speed.

Is there a website platform that is most vulnerable some may ask?

Based on statistics of 40,000+ WordPress Websites in Alexa Top 1 Million, the result is that more than 70% of WordPress installations are vulnerable to hacker attacks. All of us have wondered why WordPress is such a popular target for malicious hackers. The answer is simple – WordPress is the most widely used website building tool powering more than 32% of the Internet. In numbers, the results are massive as the number of total active websites is estimated at over 1.3 billion according to a survey published by Netcraft, which means that around 455,000,000 websites are using WordPress right now.

Having these numbers in fact and getting back to the 70% hacked websites in the beginning plus adding our own experience as one of the leading web hosting companies in the world we believe that security is a major problem of all websites hosted nowadays.

No matter if you have a website built with WordPress or any PHP application you might be at risk as technologies are constantly evolving, thus making you and your website`s developers hard to follow every single exploit that appears. Having this in mind, we put together our years of experience hosting and fixing vulnerable websites into a good cause and we created a state-of-the-art inhouse built Premium malware scanning tool.

WebHostFace Protection and Detection – Premium malware scanning tool

cPanel Security Section

As a hosting provider, we’re aware that many sites are being exploited globaly on daily basis. Thus we decided to implement a security scanner that actually works and is updated with the newest vulnerabilities.

There are other scanners available, like the cPanel default scanner or some plugins for WordPress sites. So – what’s different here?

Our Protection and Detection tool will run with customized malware databases. We’ve tested the tool with over 1000 infected sites, ranging from WordPress to Laravel and custom written in PHP ones, to make sure that any malware present in the account will be detected.

The tool that you can have does NOT use your cPanel account’s resources – it uses server resources to run and scan your account. If you use a plugin like WordFence to scan your account you might find your cPanel account hitting its limits in regards to CPU or I/O. This can cause downtime to your site or other sites that you host in your account. The tool ensures NO downtime experienced due to resource limits.

Our team will be automatically notified if there are infected files present in your cPanel account. In this case, we can provide further guidance on what can be done and insight about how your site was exploited. This will help to fix the issue permanently.

In summary:

  • Custom Malware Database – Guaranteed Malware Detection
  • Does not use your cPanel account’s resources
  • Automatic Notifications once per week
  • Reputation Loss Prevention

We will cover all benefits one by one as the devil hides in the details.

Custom Malware Databases

All scanning tools require large databases with virus definitions, vulnerabilities and all kinds of website exploits listed. In order for a malware scanner to work successfully, all these databases should be updated on a regular basis and to be monitored by expert staff that knows what they do. Once the databases are accurate our scanning tool performs scans of your websites and detects and protects your files. The scanning tool relies solely on the newest available malware databases over the internet thus ensuring superb results, speed and scanning results.

Server Resources Usage

All websites are hosted on some kind of server environment. Especially new website or websites that are starting from scratch or even small to medium business websites may rely on shared hosting account where the resources are limited. Most of the malware scanners that are available online use the resources allocated to your web hosting account and this might cause you trouble with your hosting provider. You may be contacted that your site takes too many resources and you need to upgrade to a higher hosting solution, however, the real reason is that some third-party applications may be eating up your resources.

Our state of the art tool uses more allocated resources from the main server, not your own account thus ensures speed, performance and fast results for the scan. Also, your website will not experience any downtime due to account limitations.

Automatic notifications – Instant action and reaction

The WebHostFace Protection and Detection – Premium malware scanning tool runs on a schedule every single week and ensures your site gets covered even when you sleep. Our system checks your files in the most convenient time – when the server is not loaded and it has enough power to fulfill the requests brilliantly. After this we receive notifications that tell us if the websites hosted on our servers are vulnerable. If the tool has found malicious files, we notify our customers with easy to follow step by step guidance on how to have the issues fixed. This will allow immediate reaction against the threat and to “nip it in the bud” before it develops into a more serious issue. This tool is implemented and customized so that it provides both the users and us, as a hosting provider, with an additional layer of safety.

Prevention

The biggest problem when the client has malware is the loss of reputation with visitors and Google. Google can flag the website and domain, delist it, and deindex it. Hackers can penetrate and deface the website. If infected or hacked, your site will get demoted. This tool catches the malware before it can cause such damage and prevents visitors and Google from even knowing that there was malware on the account. Moreover, the PD also helps detect the origin of the malware – a file uploaded through a plugin or a form submission on the site – which makes it possible to permanently remove the vulnerability and solve the problem.

Summary

We have tested thousands of websites for the past few weeks. We performed more than 10 000 security checks on different websites written in PHP and more specifically WordPress and we are proud to present a WORKING premium malware tool that really does its job. We compared our results with the competitors and the WebHostFace Protection and Detection tools had a rate of almost 100% finding all the newest threats for any website created on PHP.

Your online project and you as a website owner deserve a tool that can prevent, detect and protect your hard work!

Contact our 24/7 customer service department to help you activate your Premium malware scanning tool – WebHostFace Protection and Detection.

The post Premium malware scanning tool – WebHostFace Protection and Detection appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/whf-protection-and-detection/feed/ 0
Understanding the PHP Error Log File – What, Where and How https://www.webhostface.com/blog/php-error-log-file-what-where-how/ https://www.webhostface.com/blog/php-error-log-file-what-where-how/#respond Tue, 05 Feb 2019 19:44:23 +0000 https://www.webhostface.com/blog/?p=4462 Imagine this scenario. You are working on your online shop, updating products and preparing a neat promotional campaign… Suddenly everything crashes. Uh, oh! Your website is no longer available and it’s just spewing some coded error messages you cannot comprehend. A webmaster’s worst nightmare – losing your web project and not even knowing what to […]

The post Understanding the PHP Error Log File – What, Where and How appeared first on WebHostFace Hosting & Design Blog.

]]>
Imagine this scenario. You are working on your online shop, updating products and preparing a neat promotional campaign…

Suddenly everything crashes. Uh, oh!

Your website is no longer available and it’s just spewing some coded error messages you cannot comprehend. A webmaster’s worst nightmare – losing your web project and not even knowing what to do.

But fear no more!

This is where the PHP error log file comes to the stage – an invaluable assistant in the whole website management process. A virtual epitome of the famous saying that “real heroes don’t wear capes”.

What is the error log?

А website can crash due to а variety of reasons. More often than not, technological evolution is surpassing the rates at which people are updating their web pages. This opens a gap that some of your website components cannot overcome.

Let me give you an example. Your blog is smoothly running on WordPress, you have added some extra pizzazz and visitors are creating a good amount of traffic. The new release of WordPress doesn’t sit so well with your website and it suddenly it all goes offline. But what can it be?

It might come as a surprise, but a large portion of website errors are caused by old components that are not updated for a long time. This can apply to:

– old plugins
– old themes
– old application version
– wrong PHP version
– different server configuration

For the convenience of our users, we created an article about the WordPress Error Log Debugging. As WordPress is one of the most popular website building application nowadays, understanding how it uses the error_log file can make your life a lot easier.

What does the PHP error log file do?

In online projects, the error log is a file which keeps all the information about your critical website errors. Since it’s uploaded to the server, the errors are visible only to you and hidden from your visitors. If you are computer-savvy, those logs can provide crucial details that will help you locate and eliminate the issue. Even if you are a novice user, you can still get a rough idea of what’s happening and help the Support Team with the troubleshooting.

That’s another key moment here – knowledgeable support. Any good hosting provider should constantly train their Support Team to provide the best assistance possible and “reading” those error logs is a huge part of that process. A great host will even go one step further and teach you how to read the files yourself.

You are always welcome to the WebHostFace Live Chat with questions about your log files.

Where is the PHP error log file located?

There is no definite answer to that question as this strongly depends on the location of your website files on the server. In the Linux default configuration, you can find the logs in a few easy steps.

-> log in to your cPanel
-> find your File Manager
-> go to public_html (your root folder)
-> find the Log subfolder

Alternatively, you can use the php.ini file and find the line error_log.

After you locate the error logs in cPanel, you can View or Edit them for more information.

Why do you need the PHP error log file?

For starters, it is a source of priceless information that will help you learn more and diagnose website errors. It might not seem like a big deal but if you are running a campaign and your site goes down every second matter.

Every. Single. One.

Should you still need to contact your host’s Support Team, you can at least give them a good idea of what might have happened, what have you already tested and what were the results. Even if you save them just a couple of minutes of testing – this will still bring you closer to the solution.

As you learn more about the different errors, you will able to track patterns and even prevent issues from occurring again.

Let’s summarize all this.

Your PHP Log Error file detects and stores your website errors. You can find it in your cPanel and view/edit it with a simple mouse click. Learning to understand the error logs can greatly help you prevent recurring issues, fix unexpected errors, and cooperate with the Support Team of your web host.

Sounds like a pretty good deal, huh?

We will do you one better!

The WebHostFace Team is 24/7 available for you via chat, mail or phone so don’t hesitate to ask them for more info about your PHP error log.

The post Understanding the PHP Error Log File – What, Where and How appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/php-error-log-file-what-where-how/feed/ 0
SSH Terminal Commands in Linux and Windows https://www.webhostface.com/blog/ssh-terminal-commands-in-linux-and-windows/ https://www.webhostface.com/blog/ssh-terminal-commands-in-linux-and-windows/#respond Fri, 28 Dec 2018 10:22:24 +0000 https://www.webhostface.com/blog/?p=4422 In this article, we will help you get the basics of what is a terminal, how it is related to SSH, how to connect with SSH and basic usage of the most popular Linux and SSH commands that can be used with terminal both from Linux or Windows machines. What is a Terminal and how […]

The post SSH Terminal Commands in Linux and Windows appeared first on WebHostFace Hosting & Design Blog.

]]>
In this article, we will help you get the basics of what is a terminal, how it is related to SSH, how to connect with SSH and basic usage of the most popular Linux and SSH commands that can be used with terminal both from Linux or Windows machines.

What is a Terminal and how is SSH related to it?

A terminal is that green black screen in which you would usually see a hacker sitting in front in the movies. Outside of what the big screen industry commonly promotes, it’s used on a day to day basis to interact with your computer or server by executing commands directly, without the use of a Graphic Interface. The benefits for an experienced user is the speed and the performance you get on top of the fact that graphics interfaces normally stuck when executing complex commands.

SSH stands for Secure Shell which is a way for you to safely connect to an external computer, not necessarily in your home or continent and execute commands on it as if you’re actually executing them on your own machine. This allows you to administrate remove computers (servers) without the use of actually being at their location physically.

Most users are familiar with their graphic interface from their Windows or Mac and are comfortable with clicking around different windows to perform operations. For example, you can easily open your browser and check your favorite website or launch a desktop application for the time and set a reminder for tomorrow.

Those actions, performed by clicking around your applications, are interacting with the programs (or widely referred to as applications nowadays) on your computer and giving them instructions on what to do. Some of those programs or applications also provide means with which you can actually perform the exact same thing as you would through its graphical interface but actually do it from your computer’s console, thus being called Command Line Interface or CLI for short.

The various ways that you can interact with your computer’s folders and files are also available to be done through the terminal. So,

Fast SSD Hosting with SSH access

What is the difference between a graphics interface and a terminal and what does SSH has to do with any of it?

The graphics interface is an easy way for you to instruct your machine to perform a specific action. Most of those actions can also be performed through the terminal. If you’re administrating a remote server and there is no graphical interface to work with (as is the case with Linux servers) you are required to work with a terminal.

The way that you connect to the external server’s terminal is through software called SSH.

Connecting with SSH

You can connect with SSH with a User and its Password. Those are the Users present on the external server. Some safer configurations require that you have a key with which you can connect directly. The way keys work is that you need to generate one on the external machine and then download it on your local computer. Then you can use the downloaded key to connect to your User on the external server.

This is done with using the SSH keygen command

First, we’ll start generating the key

user@server$: ssh-keygen -t rsa -b 4096 -C "ssh-test@webhostface.com"

You will have the key’s information created, then you’re required to save that information into a file. You will be prompted to just press Enter to have it saved in your default .ssh directory as id_rsa

After that you will be prompted to enter a passphrase for the key, this is the password for your key.

When you have generated the key on the external machine and have downloaded it to yours you can start connecting over SSH to the external server.

The Linux Command Line

After using SSH to connect to an external Linux machine you will have access to your User’s Command Line. The Linux Operating System is built with security being one of its main priorities and as such the folders (called directories) and files have permissions on them for access. Depending on those permissions the User with which you connect will have access to different commands and be able to interact with the server in a different way. For example, a normal User will not have access to the tools available to an administrator.

One of the most common issues when executing commands through SSH is that you might actually have the command missing. For example, when working with PHP you might use Composer, it is a Command Line Interface Tool which will allow you to perform various operations for your PHP installations (like Laravel). One of the issues that might occur during the execution of the Composer’s functionality is to find out that the Composer is missing but to actually have it present in your account as an executable file.

Fixing the Command not Found error

When you log in with SSH to an external server you actually start a new Shell Session. In that session, your terminal is required to understand a certain set of variables which help and dictate the terminal’s workflow. Those variables are called Shell Variables and one common way to find out some of them is to run the env command

user@server$: env

The variables are loaded with each new session that you start. One of the variables is called $PATH and this one instructs your terminal in which directories (remember – the Linux word for folders) it should look for executable commands. If at any of those directories the command is not present – you will end up receiving the Command not Found error.

For this, you can easily add the directory in which your executable is present to the path variable, once this is done you will be able to directly call the executable as it’s already present in the $PATH of which your shell is looking for commands.

Linux SSH Commands

There is a variety of Linux commands that can be run through SSH. Most of those commands are written by developers and represent actual programs which you might also see to have Graphical User Interfaces, like your browser.

Each Linux Operating System also comes with many of its own pre-installed commands, some which present among all other Linux distributions, those involve commands for working with:

– The file system

– Text formatting

– Making requests over the internet

– Network administration

If you’re interested in knowing more about the Linux commands you can take a look at our Knowledge Base. You can find the most common and widely used SSH commands for beginners and experts. Also, you can get a new shared Linux hosting account or a Linux Dedicated server on a greatly discounted price and test your knowledge and administer your hosting account using Linux commands under SSH

The post SSH Terminal Commands in Linux and Windows appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/ssh-terminal-commands-in-linux-and-windows/feed/ 0
Website speed optimization with Google Insight vs. GTmetrix vs. Chrome https://www.webhostface.com/blog/website-speed-optimization/ https://www.webhostface.com/blog/website-speed-optimization/#respond Wed, 07 Mar 2018 08:00:22 +0000 https://www.webhostface.com/blog/?p=4018 Having a fast website is very important nowadays. The way a website loads is important not only to the visitors but to the search engines like Google as well. This makes the website loading time one of the most important aspects when creating a successful website. The speed of the website depends on several different […]

The post Website speed optimization with Google Insight vs. GTmetrix vs. Chrome appeared first on WebHostFace Hosting & Design Blog.

]]>
Having a fast website is very important nowadays. The way a website loads is important not only to the visitors but to the search engines like Google as well. This makes the website loading time one of the most important aspects when creating a successful website. The speed of the website depends on several different criteria and one of them is the hosting provider. Having a secure fast hosting environment can save you a lot of time efforts and can boost your rankings dramatically over non-optimized hosting that is cheap but offers bad user experience and loading time. In this article, we will show you our professional experience of optimizing websites to the extent that they get highest possible results in websites like GTmetrix and Google Insight. Also, so we will show you how to use Google Chrome browser to check if the website is working as it’s supposed to and to see the loading time of all elements of your website so it can be fully displayed to the end visitor. In the long run, this will help you get the needed fast user experience and all your website optimization efforts will definitely tell Google that you’re a person who cares about the performance of your website and that your website matters to you.

Is there a general website optimization guide?

As a web hosting company, we have quite a lot of customers who use different website building applications and tools and it is very important for us to know how these applications work, how and what files do they load and what makes them fast and what makes them slow. It’s virtually impossible to know every single application in the details that developers know it but our job has taught us how to find critical components that slow the website, make the site performance bad and influence your Google rankings.

What tools to use to measure your website performance?

We use websites and tools that give suggestions what are the weak points of your website and give simple suggestions what to fix. On top of this, we have optimized thousands of websites and we have gained the needed experience to see the weak points in a matter of minutes. As mentioned before, such websites and tools are Google Insight, GTmetrix, and Chrome browser. Every website owner should know how to fix the main suggestions from these websites, however, if you want to focus on your business and effectively grow, the best way will be to dedicate this work to someone who is more focused in this niche and has the experience. As a web hosting company, WebHostFace has done website optimizations and we can show you what is important to us when we start the process of making a website faster. At the end of this article, you will know how to optimize your website on your own. It might take you some time to check the resources provided and make the needed changes but believe us, the result is worth the time invested. If you are not a tech guy and wish to focus on growing your business, we can do the website speed optimizations for you so you can devote your time to other aspects of your business like writing content, doing SEO for your website, making the website popular with link building or doing some leisure activities with your family and friends.

Why and how to optimize your website for Google Insight? Can I achieve 100 out of 100 points?

Google PageSpeed Insight Website Optimization

Let’s start with the developers’ platform Google PageSpeed Insight. Don’t be scared, most of us are not developers too, but we are still using the Google Insight platform because it gives valuable suggestions about the performance and speed optimization of your website and of course, most importantly, they come from Google. As the name states, it’s a product by Google that shows you how your website’s performance is rated on a straight out of 100 points scale. The higher your website rank is on mobile and desktop, the better Google might rank you. It’s not explicitly written that if you score 100 out of 100 on your website Google will rank you on page 1 or in top three results but the fact that Google has made this tool and the fact that it is proactively showing it’s importance, definitely means you should consider it a top priority. It reveals some of their algorithms and best practices to facilitate and help you optimize your website to their best performance website guidelines.

Another fact about Google Insight is that you get the results of your website performance in terms of speed and user experience in the Google Analytics. You know that the Google Analytics is one of the single most important tools to measure the visitors’ metrics of your website. Inside the Google Analytics, you get your own space where you check the behaviour of your website visitors and you can see the loading time of your entire website. Google Analytics also shows the timings of each page on your website pages and the speed suggestions are connected with the Google Insight. This section shows the average page load time, the PageSpeed suggestions and the PageSpeed Score. Based on our experience, PageSpeed scores below 60 need immediate attention especially if the pages associated are important pages of your website. This is a very fast and effective way to see what Google has to tell you about your website and its pages in terms of speed optimization. Also, there is a link directly leading you to the Google Developers platform – Google Insight or also called PageSpeed Insights website where we can check the suggestions. This shows one more time the importance of the user experience and why the website needs and should be optimized for speed.

Google PageSpeed Insights Tips learned the hard way!

Here is a quick tip for you: it’s easy to complete the Google guidelines and get 100 out of 100 on a website that is not very popular and is just starting to grow. If your website is not full of fancy customer oriented plugins, ads, popups, social features and statistics measurements, it is normally easy to achieve 90 and above. If your site is heavy traffic and requires detailed statistics, traffic conversion plugins like popups and chat, don’t always push yourself to get 100 out of 100 from your website. Sometimes it is virtually impossible to get 100 out of 100 and still have the functionality you wish and require for your website to work properly. Our experience shows that anything above 80 is a super result for mobile and desktop in the Google PageSpeed Insights tool.

Another tip for you is that you can’t optimize everything.

As we mentioned Google Analytics a while ago, it requires a special code to be implemented on your website so you can track your visitors, where they’re coming from, what are they doing on your website. It also shows how much time they spent and what are their activities on your website as well as the page speed and the opening timings of your pages. If you run tests on several different websites that use Google Analytics, you might see that there is a suggestion that you optimize this resource in the Leverage browser caching section. However, this resource is an external resource to your website and you don’t have a direct access to it nor it’s code.  So you simply get the code from Google Analytics, paste it into your website and you can’t modify the expiry header. Although Google PageSpeed Insight is telling you to Leverage Browser Caching for it, you are with your hands tied.  So don’t always push yourself to optimize everything as it is virtually impossible.

What is the Google Speed Insight suggestion – Leverage browser caching?

Leverage browser caching is a setting to help you declare the expiry date or a maximum age in the HTTP headers for static resources. This setting instructs the browser to load previously downloaded resources from local disk rather than over the network. Such a resource is the Google Analytics tracking code and to be specific the – https://www.google-analytics.com/analytics.js (2 hours). The 2-hour period in the brackets shows the expiry date or the maximum age which as you may see is quite little. Depending on the type of the file, the leverage browser caching differs. The idea is – the lower the chance to change the file, the longer it should be kept. Meaning you do not change the logo of your site every day or every week. Normally, you do it once or if your project gets rebranded, so you can set the expiry for the images .png files for access to 1 year.

Check our case study, how we optimized the websites of our clients following the Google Speed Insight suggestions (coming soon)

Why and how to optimize your website for GTmetrix tests? Can I achieve score A on all tests?

GTmetrix Website Optimization Website

Let’s now check the website called GTmetrix. It is a free web speed test tool that gives you access to different server locations in Europe, North America, South America, Australia. You can use these different server locations to test your site in terms of speed, how fast it loads and what is the number of connections that are made to your website in order to load completely. Also, you get a nice visual score for your Page Speed score and for Yslow. The maximum score in GTmetrix is A so we need to head in this direction and it is pretty possible to be achieved!
If we need to make a differentiation between Google Speed Insight and GTmetrix, the GTmetrix shows you what elements are taking too long for your website to load and how to optimize them, including detailed suggestions and information with tutorials and easy-to-follow articles.

Why do we like GTmetrix?

Well, it’s free, it’s very well written and it gives you quite a handful of suggestions. On top of this, you get different server location so if your visitors are mainly from Europe or North America you select the server that is near the main visitor stream of your website and you get the most accurate analytics for how long they open the website fully, what is displayed first and, of course, what to edit in order for them to get the best possible user experience.

Will you wait 10+ seconds for a website to load?

Based on my personal experience, I don’t like websites that load slowly. There are so many different resources over the Internet and if a website doesn’t load fast in let’s say 2-3 seconds, I simply don’t wait for the website, close it and go to the next resource. With more than several billions of websites, it’s a shame to wait for slow websites to load. Of course, some websites are meant to be slow and their owners know the sites take a little longer to load.

What does this mean and why some sites are intentionally slower?

These websites are heavily dependent on different tracking and analytics tools. We spoke about Google Speed Insight and it is just one of the many visitor activity tracking tools. If your site has lots of visits you will definitely need to know what these people do on your pages and how they interact with your website. Here comes the bad part of implementing important but sometimes heavy and website slowing tracking tools and scripts that give valuable information about your visitors. I personally like Piwik (now Matomo) as a visitors activity tracking tool on top of the must-have Google Analytics, however, Piwik (now Matomo) has some downsides. One of these downsides is exactly the decrease in the fully loaded website speed. This tool can be made to load at the end of the loading of the website when everything else is loaded so virtually your visitor will not see the difference in terms of speed but for machines tracking your website, tools, and search engines like Google monitoring and tracking your website with every visitor, this can make a huge difference.

Check our case study, how we optimized the websites of our clients following the GTmetrix suggestions (coming soon)

Why and how to optimize your website with Chrome browser? What to look for in the Network tab?

Google Chrome Browser

Let’s talk a little bit more about Google Chrome browser and how it can help you optimize the speed of your website and see if the website is working as it should be. In order to understand if your website is loading fast enough, we will introduce some terms like DOMContentLoaded and Load times.

As a browser developed by Google, it implements some very important and widely used tools not only for developers but for website owners and webmasters as well. Let’s start with some updates – from the beginning of January 2017 when Chrome introduced some important SSL (secure socket layer) changes. All webmasters who use the Google Search Console got messages stating – Nonsecure Collection of Passwords will trigger warnings in Chrome 56. This made the SSL an important and mandatory part of every website that wants to make legitimate online business. The SSL sign or the https and the green lock on top of the browser where you write the URL were introduced as something that you should do right away. The good part was that a lot of the hosting companies who took their business seriously introduced Let’s Encrypt: an option that allows you to install free SSL for your website in a matter of 3 mouse clicks. You simply log into your CPanel, locate the let’s encrypt button and install the SSL for the website you wish.

So following the guidelines that are coming directly from Google is something that every website owner should do. That is why optimizing your website using the Chrome website browser is as important as optimizing the speed and opening time of your site with Google Speed Insight and GTmetrix.

What to look for in terms of website speed optimization in Chrome?

When you open your Chrome browser and hit the F12 (for Windows) or Command+Option+J (for Mac) button on your keyboard a new type of console will open on the right-hand side on your screen. It will make your website a little bit smaller as it will adjust your site in the space left on your screen. Note this is a good way to check if your website breaks on different resolutions i.e. on different devices like laptops, tablets, smartphones – simply drag the new separator that appears on the left and right to make the site smaller or larger and see how it rearranges on different screen resolutions. Note that a 4.7″ Apple iPhone 6 viewer reads your website on a 375 x 667-pixel screen, so you can see what is the visible part of the website for such users using the Chrome browser.

As for the website speed optimization, there are several different buttons in this console but we will stick to the Network button as it will give us some important metrics on how fast your website loads and, as mentioned earlier, the DOMContentLoaded and Load times.

When the console is opened with F12/Command+Option+J, simply type in your website in the browser and hit enter like you normally do to open a website or simply use F5/Command+R to reload it if you have already opened the site. On the right-hand side, you will see the different parts of your website start to load like different files with different file extensions such as: .php, .js, .css, .png, .jpg. These are the components of your website, the code of your website, the styling and the CSS, the pictures and everything the browser needs to display your website to the end visitor. Every single file takes some time to be loaded and to be extracted from the hosting server and displayed by the browser to your visitors. The most important part of this network tab inside Chrome browser console as said is on the bottom of the console where it’s written DOMContentLoaded and Load. The results are in milliseconds or seconds and the less these seconds are the better for your visitors, for the search engines and for you.

What is DOMContentLoaded and Load times in Chrome Browser?

Both of these metrics are very important and show how Google and especially Chrome browser will load your website and the timing of this process.

The explanation of the DOMContentLoaded is – the event is triggered when the initial HTML document has been fully loaded and parsed. This is without the waiting time for the stylesheets, images, and subframes to finish loading.

The Load time on the other side of the picture is considered to be the fully loaded time for your website.

If your website is optimised it should completely load, which is the red text, in less than 2-3 seconds, and this is your ultimate goal. If the website needs some work and loads above the two-three seconds limit, you will see which component takes the most time to load in milliseconds or seconds in the elements listed above. You’ll see if it’s a .php file, if it’s a picture that is too large and it is taking too much time to fully load or if it is your CSS styling sheets data giving you trouble.

The real question is – Do hosting companies want your site optimized and with perfect speed performance?

Let me reveal a secret to you – the hosting companies don’t wish to have optimized websites on their servers. I’m sure that most of you who have popular sites know the answer but let me tell you what is the real truth behind this. If a website is not well-optimized and it has a decent amount of visitors it will take more and more resources over time.
You know that there are several different types of hosting and the entry level is called SSD shared hosting where a lot of people are sharing one and the same server. Normally this server is a monster machine that has hundreds of GBs of RAM, at least 32 CPU cores and powerful CPU processors with large SSD drives, but still, these resources are limited, although it looks as a hell of a powerful machine. Imagine you have several very popular and poorly optimized websites on the shared hosting server. The work of the hosting company and the system administrators is to monitor the performance of the server if the server gets load it means it is busy and all the customers get poor quality of service and a decent amount of loading time due to the depleted server resources. The server administrators or the automated server monitoring tools will see which account and specifically which website is getting these requests and will limit them so it doesn’t slow the whole server.

Even if you’re not an expert you already know that the work of the system administrator is to simply cut off these requests or temporary block your website so the load of the whole server drops.
In the normal case scenario, these will be real people willing to visit your website, read your articles, get your products, subscribe to your services and hopefully generate some income to you.
The server administrator will not start optimizing your website and they will simply open an abuse case to you and they will tell you that your website is taking way too much resources than the resources allocated to you. The next step will be to show that the shared hosting accounts are not suitable for you anymore and you will be forced to upgrade to a higher hosting solution like a virtual private server hosting (VPS) or even a dedicated server hosting (a private server) only for your website and the needs of your projects.

This is far more profitable to the hosting company as the difference between shared hosting which is the entry level and the virtual private server hosting (VPS) is like 5 to 10 times more and from VPS to a dedicated server it is again 5 to 10 times more depending on the resources you get in these packages. And not to mention that the VPS and dedicated servers are paid monthly so this all means that you become a very very profitable customer to your hosting company.

Well, we at WebHostFace have quite a different strategy!

We know that people love to install different plug-ins that do different fancy things on their websites like something to pop up, some newsletter sign-up forms, contact forms and chats, to have different tracking tools to monitor the activity of the website visitors or simply have plugins that make backups or save some entries to the database of the website. All external plug-ins that are installed on your website take valuable resources and based on our experience, people use hundreds of different plugins and the website finally gets very very slow.

How can WebHostFace help you with your website speed optimization?

Here comes the good part: we have the experience to tell you which plug-ins are good, which are taking too many resources and give you almost nothing for your website performance and growth and we can substitute them with working plug-ins or simply optimize the ones that you use. Optimizing existing plugins by tweaking their settings and making them perform much faster than before is vital for the website speed and performance for your visitors, the search engines, and you as a website owner.

Another good thing is that the website speed optimization process gives very visible results to the end user, the people that you wish to attract and do business with, and to the server resources that your website uses. Pretty much it is a win-win-win situation where everyone is happy. You as a website owner have a website that is working fast, it is optimized and it can still be hosted on a lower-end hosting solution that is not so expensive, your visitors get the best user experience possible as the website loads fast and they get the resources they are looking for in a matter of two or three seconds, and the last but not least your hosting provider doesn’t have to monitor your website and to temporarily suspend or limit it is resource usage. Pretty much it’s a win-win-win situation for three different parties your visitors, your hosting company and you. There is someone else who is also monitoring the performance of your website – the fourth one is Google and the other search engines who care and check your website speed performance regularly.

The post Website speed optimization with Google Insight vs. GTmetrix vs. Chrome appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/website-speed-optimization/feed/ 0
Most Popular MySQL Commands https://www.webhostface.com/blog/most-popular-mysql-commands/ https://www.webhostface.com/blog/most-popular-mysql-commands/#comments Mon, 19 Feb 2018 10:30:03 +0000 https://www.webhostface.com/blog/?p=4344 The Structured Query Language SQL is a domain-specific language most commonly used by applications to communicate with a Database and manipulate information. By manipulating we can look at the most basic functionality that’s offered known as a CRUD – Create, Read, Update, Delete. In this article, you will see a list of the most popular […]

The post Most Popular MySQL Commands appeared first on WebHostFace Hosting & Design Blog.

]]>
The Structured Query Language SQL is a domain-specific language most commonly used by applications to communicate with a Database and manipulate information. By manipulating we can look at the most basic functionality that’s offered known as a CRUD – Create, Read, Update, Delete. In this article, you will see a list of the most popular MySQL commands including examples how to use them in real life. We also prepared an example how to change the URL of a WordPress Website.

The Database serves as a heart to a Web Application. It is the information that the Application revolves around and initially build to serve. Much of the information that’s stored in a Database must never be revealed to the public eye and as such it must be secured properly. Most applications nowadays are secured against SQL Injections and carefully tested for any information that could leak due to internal errors.

The SQL itself could be split into two sub-languages: Data Definition Language and Data Manipulation Language. One is used for defining the Database itself whether the other for interacting with the information that’s stored in it. Experiment using phpMyAdmin on our MySQL Hosting Packages!

Most Popular MySQL Commands

In this article, we will review the basic usage for making a CRUD (Create, Read, Update, Delete) functionality and the most-used commands with MySQL that could also be run in a WHM / cPanel stack. Most of the commands in this article can be run through a phpMyAdmin interface and we will leave a reference to MySQL’s documentation. One other thing to notice – the SQL Syntax is always in UPPERCASE although the newest CLIs won’t judge you if you wrote most of the commands the way you want. It is necessary, however, to always end a command with ‘;’.

New Website Launch WebHostFace

Create MySQL database command

First, we’ll need to create a Database. When I usually go about creating a new project I always specify the Character Set that will be used and the Collation of the tables and to make sure I haven’t already created it. Ref: https://dev.mysql.com/doc/refman/5.7/en/create-database.html

CREATE DATABASE IF NOT EXISTS `wrong_database_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

 

Delete MySQL database command

Let’s say that I’ve gotten the Database name all wrong and I want to rename it – I’ll have to delete the Database first or DROP it and then create it with a valid name. Ref: https://dev.mysql.com/doc/refman/5.7/en/drop-database.html

DROP DATABASE IF EXISTS `wrong_database_name`;

 

Manipulating MySQL Databases

I’ll assume we’ve created a valid Database. Now what we need to do is to build up its structure. By this I mean add Tables to it. We’ll begin by using the Database and then adding a Table that will hold information for People – their name and age.

USE `database_name`;

CREATE TABLE people
(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255),
age INT
);

 

MySQL Database Relations

MySQL is a Relational Database, this means that it can store information about many entities, however, information about each entity will be in its own separate Table. For example, our project might be an e-commerce system in which we will offer books to our members. The application will hold data about Authors, Books and Clients. Each of those entities will have its own Table containing information just about them, like Name and Age for the Authors or Title and Date Published for Books. When those Tables are created the relation between must be made as well.

There are several Relations that can be used:

One-To-One
One-To-Many
Many-To-Many

A One-To-One might refer to an Employee to be associated with just one Organization and just that Organization to be employing this Person. In this case, we simply create one field in each Table that corresponds to the opposite entity.

A One-To-Many relation might refer to one Client having bought many products but those products will be purchased by just that Person. Here we create one field on the Many sides that points to the One entity that owns them.

A Many-To-Many might refer to Authors and Books. One Author might write many books during his career and one Book might have more than one Author. This is a case in which we create a separate table holding the relations in at least two fields.

In our basic example we won’t be using relations nor joins but I’ll be listing the most used MySQL commands which might have them.

 

Populate MySQL Database

Now that we have created our Table we’re ready to populate it. The ‘C’ of CRUD stands for Create and we’ll need to create a person or two. This is done with the INSERT command. Ref: https://dev.mysql.com/doc/refman/5.7/en/insert.html

INSERT INTO
`people` (`name`, `age`)
VALUES
('John', 24),
('Jane', 22);

This will create two entities in the People Table named John and Jane, aged 24 and 20 respectively.

 

Find information from MySQL Database

Now let’s say that we want to retrieve information about John and Jane, the ‘R” standing for Read. We’ll use the SELECT command. Ref: https://dev.mysql.com/doc/refman/5.7/en/select.html

SELECT
`name`,
`age`
FROM
`people`;

 

Run Selective MySQL Command

This will list all entries for the name and age columns from the People Table. In most cases (and when doing pagination) we want to limit the results or provide a WHERE clause. Let’s say we want the first Person entry that’s older than 22, we’ll use:

SELECT
`name`,
`age`
FROM
`people`
WHERE
`age` > 22
LIMIT
1

 

UPDATE MySQL Database Command

That will list just John but let’s say that Jane’s birthday comes and she becomes 23. We’ll need to update the Table’s information, or use the ‘U’ – Update command. Ref: https://dev.mysql.com/doc/refman/5.7/en/update.html

UPDATE
`people`
SET
`age` = 23
WHERE
`name` = 'Jane';

Delete MySQL Database Entry

The example could be for our Company’s Employees, in our example, we can say that Jane leaves the company and needs to be removed from the Database. Usually Deleting entries is a bad idea, instead, we should keep all entries in another Table used to view any inactive / “deleted” entry.

DELETE FROM
`people`
WHERE
`name` = 'Jane';

The above operations cover a very basic CRUD (Create, Read, Update, Delete) MySQL Database commands. As basic, they are, those commands are what is used on most of the interactions you do with an online Web Application.

How MySQL Database communication Works?

When creating a new account you’re interacting with the Database. It first looks to see if there’s already another User that has taken the Username – it uses SELECT for that. Then, if validated, you’ll create your account – the Application uses INSERT to store your account’s information. Any change that you make to your profile would invoke an UPDATE command and if you decide to close down your account you’re probably looking at a DELETE command although other options also exist.

Most Popular MySQL Commands

To illustrate this I’ll list some of the most popular MySQL commands used (referencing StackOverflow) . Some of them require that you have root access to the server.

# Show All Users

SELECT User FROM mysql.user;

# Finding all tables in MySQL with a Column Name in them

SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('first_column','second_column')
AND TABLE_SCHEMA='database_name';

# Duplicating a MySQL Table, Indexes and Data

CREATE TABLE newtable LIKE oldtable;
INSERT newtable SELECT * FROM oldtable;

# Selecting a Max Value from a Column

SELECT id, MAX(column)
FROM YourTable
GROUP BY id;

# Getting a Database Size in Mbs

SELECT table_schema "DB Name",
Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;

#Listing a Table Structure

SHOW CREATE TABLE `your_table`;

# Showing Indexes from a Table

SHOW INDEX FROM `your_table`;

# Changing WordPress’s URL

UPDATE DATABASE-PREFIX_options
SET `option_value` = ‘http://newdomain.com’
WHERE `option_name` = ‘siteurl’
OR `option_name` = ‘home’;

The post Most Popular MySQL Commands appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/most-popular-mysql-commands/feed/ 1
What is SQL – Popular DML and DDL SQL commands & statements https://www.webhostface.com/blog/what-is-sql/ https://www.webhostface.com/blog/what-is-sql/#respond Mon, 05 Feb 2018 08:00:18 +0000 https://www.webhostface.com/blog/?p=4270 Many of you have heard about SQL. In this web hosting blog post we will cover the fundamental idea behind the SQL, what is SQL and different versions that are used nowadays. What is SQL? SQL stands for Structured Query Language. It is the language that many applications use for storing and reading Data. There […]

The post What is SQL – Popular DML and DDL SQL commands & statements appeared first on WebHostFace Hosting & Design Blog.

]]>
Many of you have heard about SQL. In this web hosting blog post we will cover the fundamental idea behind the SQL, what is SQL and different versions that are used nowadays.

What is SQL?

SQL stands for Structured Query Language. It is the language that many applications use for storing and reading Data. There are generally two variations of SQL software – Relational Databases such as MySQL, PostreSQL and NoSQL like MongoDB. The Relational Database usually contains many Tables, each describing entities that are part of the logic which the application uses to solve business problems. The general rule is that each Table represents the information for just one object and no more. NoSQL databases, on the other hand, store their data in Key-Value Pairs using Unique IDs for keys.

The SQL language was originally made for secretaries and was meant to be easy to use – no programming experience was required when your assistant had to enter data for a client or a meeting in their digital notebook. As such it was made to be extremely easy to be read and understood, however, the office employees didn’t quite catch up with the language and it’s syntax thus applications with graphical user interfaces were developed that abstracted working with SQL which was still the software under the hood.

SQL = DML + DDL

SQL could generally be divided into two groups – DDL and DML. DDL stands for Data Definition Language while DML is Data Manipulation Language. For example, you can imagine SQL being a building, DDL would be the foundations – the blocks that build each floor and the rooms on them while DML will be the ability to obtain information for each object or person on the floor and manipulate it. The most used commands or statements are:

Popular DML and DDL SQL commands & statements

DDL Statements:

CREATE
– this command is used to create objects like Databases and Tables

ALTER
– Changes the database structure

RENAME
– with this command, you can rename an object

TRUNCATE
– removes all records from a table

DROP
– command to delete all objects from a table

 

DML Statements:

SELECT
– Used to read data

INSERT
– Used to save data

DELETE
– Used to delete data

MERGE
– Inserts or Updates

CALL
– command used to call an already created Function

EXPLAIN
– command that provides information about an object

SQL and its usage for CRUD

The DML statements could also be defined by the term CRUD – Create, Read, Update, Delete – which is the functionality that they offer for managing the already defined structure by the DDL.

In the example above we can think that the DDL will dictate how the floors are built, their size, how many rooms each floor could have and what the dimensions of each room are. DML could provide us with means to see how many employees are on each floor (Read), move one employee from one room to another (Update), add another employee (or elephant) in a room (Create) or remove them from the building permanently (Delete).

It is well known that PHP stands behind most of the applications that are hosted in a Shared Environment but it’s not very well known that there are several drivers that are used for MySQL connection – mysql, mysqli and pdo.

 

PHP MySQL | SQL Drivers

The MySQL driver

The first driver that was used for MySQL connection was mysql. It was easy to be exploited and required extra work to implement defences against MySQL injections. The extension was deprecated in PHP 5.5.0 and was completely removed in PHP 7.0 and above.

The mysqli driver

After MySQL was deprecated, its “improved” version was implemented. The name mysqli comes from MySQL + i for Improved. It’s also the first implementation that provided Object Oriented connection to MySQL and could also be used procedural, however, it wasn’t entirely OOP based. It’s also used by WordPress for it’s DB Connection.

The PDO driver

The PHP Data Object (PDO) was introduced after PHP 5.1.0 and is the full Object Oriented approach to establishing a connection to a SQL database. It’s also advertised that it supports multiple database implementations with its Data Source Name, meaning that the functionality should be the same across multiple SQL softwares like OracleDB and MySQL.

Further abstraction
There is one more layer that abstracts the work with PDO and is most commonly used by frameworks – this is the Database Abstraction Layer. This aims to achieve working with the Database purely by using OOP instead of manually coding queries instead. Two of the most used ones are Doctrine (Symfony) and Eloquent (Laravel)

MySQL in cPanel
The most used Shared Hosting setup is cPanel with MySQL and the phpMyAdmin interface to manage your Databases. You can easily create a Database with the GUI, make a User and assign it to the Database. After that, all the information that you’ll need is the Database Name, User and it’s Password to make the connection. If you need a fast connection you can always navigate to the phpMyAdmin tool and be directly logged in to all Databases that your account has ownership of.

A short Summary of SQL = DML + DDL

SQL is the programming language that stands behind most applications and is responsible for managing their information storage. It can be viewed as a combination of Data Definition Language and Data Manipulation Language, the first being responsible for the structure that will store the information and the second taking care of manipulating that information. MySQL is the most used software for Shared Hosting and it’s easily manageable through cPanel and phpMyAdmin’s interfaces.

 

You can benefit from a fast and reliable SSD MySQL Hosting with our shared hosting services. Now with a greatly discounted price! Start your new project that needs databases without investing a large amount of money and grow your online presence! And we can help you start and grow your site with our unlimited databases hosting offer!

The post What is SQL – Popular DML and DDL SQL commands & statements appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/what-is-sql/feed/ 0
Install and Deploy Laravel application to server | Laravel Installation Guide https://www.webhostface.com/blog/install-deploy-laravel-to-server/ https://www.webhostface.com/blog/install-deploy-laravel-to-server/#comments Fri, 02 Feb 2018 08:00:04 +0000 https://www.webhostface.com/blog/?p=4261 There are several stages of developing a Laravel application. For most small startups up to medium sized projects, the process isn’t as monitored and maintained by many people as it is with big, enterprise applications. It’s also easier to deploy smaller Laravel projects faster and for this usually, a framework is used as it abstracts […]

The post Install and Deploy Laravel application to server | Laravel Installation Guide appeared first on WebHostFace Hosting & Design Blog.

]]>
There are several stages of developing a Laravel application. For most small startups up to medium sized projects, the process isn’t as monitored and maintained by many people as it is with big, enterprise applications. It’s also easier to deploy smaller Laravel projects faster and for this usually, a framework is used as it abstracts most of the work that needs to be done.

Laravel is one of the most used PHP frameworks and makes Rapid Application Development (RAD) easier. There is a significant difference between the development and production environments and we’ll cover the main process of deploying and installing a Laravel application to server.

Install and Deploy Laravel application to server

There are other factors to be considered when building software such as continuous integration and making sure there’s enough room for growth when new features need to be implemented and that their implementation will be easy, leaving the code in good, maintainable condition.

New Website Launch WebHostFace

Laravel Development Flow – Planning

Generally, the development flow of Laravel projects starts with the design of all interfaces that will be implemented. Developers ask what business problem will the application solve and see how Laravel features and options can meet the client’s requirements and expectations. After the team agrees on the interfaces they move on to the database structure. Once ready with both the team can go ahead and start the implementation. Normally this involves either a Laravel installation to a server or installing Laravel locally.

Install Laravel on Windows or Linux for Local Development

Installing Laravel is different when working in a team compared to developing it on your own. All members of the team need to work with the same version and in an equal environment, close to the live one that the Laravel project will be deployed in.

Before installing Laravel you need to make sure that your machine and the software on it cover the framework’s requirements. After that there are several ways to proceed, using Composer or it’s PHP installer.

You can look up our tutorial on using Composer to locally install Laravel on Linux or Windows from here:

Install Laravel on Linux

Setting a Local Development Environment for Laravel on Windows

 

After installing Laravel a .env file will be generated. All settings for your local environment need to be reflected in there.

 

Developing Laravel applications

Now that Laravel has been installed the team is ready to start working on implementing all interfaces, simultaneously they also work with the SQL structure. On different occasions or milestones, the application is handed over to Quality Assurance engineers that run extensive tests to prevent bugs. A big difference between well-written software and poorly written one is planning ahead of time, so when the time for updates or new implementations come – it will be done with minimal efforts.

Once ready for a production version that meets the client’s requirements the code is ready to be pushed into production. A DevOps engineer is usually tasked with this but for smaller projects, an experienced team member could also do it. In the practice that we have seen the most used tool for this is Git and there are some tools that could be used for Continuous Integration occasionally.

Difference between Local and Production environments

Experienced Laravel developers know that there are many issues that need to be looked after when developing locally so that when the code is pushed into production it behaves accordingly. Some of them that are focused on are:

– Difference between how the application will handle and respond to both HTTP and HTTPS requests. This also involves cookies and there are ways to simulate a valid SSL certificate for a local domain.

– Error displaying is usually turned on in a development environment and it is a common practice to be disabled when in production. Showing errors and crucial information about the application when working on its development is necessary but after it’s been deployed it’s not okay to expose personal information about any clients or members nor anything that might reveal information about the website structure itself.

– Testing the behaviour of the application for more than just one user. When developing locally only one developer is accessing the website at a time and the scalability of the project needs to be tested. There are many ways that this is done and one of them is using 3 different databases – one empty, one with medium data in it and a very large one.

– Caching content plays a big role in speeding up an application. It’s not desired to be around when developing the project and there aren’t always easy ways to stop it. Some simple workarounds involve using functions for displaying current time which will always yield a slightly different response to each request.

Deploying Laravel Application

When the development process has finished and the application meets the client’s requirements it’s ready to be pushed into a live hosting environment. The most used service for this is usually Git and this is where the transition from development to production is done. The most common steps involve:

1. Cloning the ready production code:

git clone {Repository}

2. Installing Composer dependencies

composer install --no-dev –optimize-autoloader

3. Laravel uses the PHP library dotenv for its configuration, for this the .env file needs to be adjusted to meet the server settings

4. Applying caching the configuration and route cache via Artisan:

php artisan config:cache

php artisan route:cache

This covers a basic development process of a Laravel application – the process of installing and deploying the Laravel application into a live environment on a web hosting server.

You can benefit from a fast and reliable SSD Laravel Hosting with our shared hosting services. Now with a greatly discounted price! Start your new Laravel Application, Install Laravel or Deploy Laravel project without investing a large amount of money and grow your online presence! And we can help you start and grow your site!

The post Install and Deploy Laravel application to server | Laravel Installation Guide appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/install-deploy-laravel-to-server/feed/ 6
CodeIgniter vs Zend Framework – The PHP Frameworks Comparison Battle https://www.webhostface.com/blog/codeigniter-vs-zend-framework/ https://www.webhostface.com/blog/codeigniter-vs-zend-framework/#comments Mon, 23 Oct 2017 11:22:10 +0000 https://www.webhostface.com/blog/?p=4105 CodeIgniter (CI) and Zend Frameworks (ZF) are one of the first PHP Frameworks and have been around for quite some time now. There are many advantages to using both frameworks and we’ll try to cover the main similarities and differences. Both are well tested and used by many applications, underwent many changes and use the […]

The post CodeIgniter vs Zend Framework – The PHP Frameworks Comparison Battle appeared first on WebHostFace Hosting & Design Blog.

]]>
CodeIgniter (CI) and Zend Frameworks (ZF) are one of the first PHP Frameworks and have been around for quite some time now. There are many advantages to using both frameworks and we’ll try to cover the main similarities and differences.

Both are well tested and used by many applications, underwent many changes and use the M-V-C model. Since they’ve been released over 11 years ago it’s very hard to find any bugs in them. CodeIgniter always had a big community that’s still being supportive. It’s very popular in Asia. Zend is trusted and well established, built and maintained by the company that develops the PHP programming language. It targets big projects and it is most popular in Europe and USA.

Back in the days, there wasn’t a big choice if you wanted to use a Framework to develop applications fast and both CodeIgniter and Zend Framework gathered popularity as many old projects were built on them. In recent days they’ve lost that popularity due to other, more rapidly developing frameworks like Laravel and Symfony.

CodeIgniter’s current version is 3.1.6, it was stuck in its 2.X version for some time and the update to 3.X came out in 2015 while ZF’s stable version is 2.4.13 and the 3 dev version is in their official GitHub.

CodeIgniter vs Zend Framework

One of the main differences between CodeIgniter and Zend Framework is the amount of code and functionality that they provide developers with and all the indirect problems that this can lead to. CI could be considered slightly outdated and due to this some features from the new PHP versions aren’t included, one such being that it’s not fully PSR-4 compatible (autoloading). Those features can be added manually but this would involve extending the core functionality.

Zend Framework is an enterprise framework used on big projects to help their business grow and it’s not recommended to be used for smaller ones. CI on the other side is a very lightweight framework and its total size is around 3 MBs in total. It’s also one of the best-performing frameworks on shared hosting environments, all that you have to make CodeIgniter work is to download its files or to simply upload your locally developed installation in your domain’s directory and you’re all set.

Advantages & Disadvantages

When it comes down to deployment PHP developers use Composer as their main dependency resolver tool. ZF has a lot of functionality added out of the box and this is one of its main advantages and disadvantages at the same time. Having a lot of options is not always good as this means that there is a lot of bloatware along with it, unnecessary code that’s dragged along the core functionality. In addition to that, there’s also a steep learning curve until you recognize how to configure everything properly and ZF is one of the worst documented frameworks making it a bad choice for beginners. CI’s documentation is very extensive and it’s way much easier to learn. It’s compatibility and ease of use are a great advantage and makes it perfectly suitable for smaller projects that need to be deployed fast. Due to this CI doesn’t include direct support for Composer and you have to manually add it in addition to making the configuration to work with any external libraries as well, another thing to mention is that they do not have a native library for authentication and built-in support for AJAX requests.

CodeIgniter is a nice introduction to working with the M-V-C model and OOP and it’s based around it despite that this isn’t fully native. One thing to mention is the CI singleton that’s used and not many developers are fond of its implementation. Zend Framework also heavily revolves around the M-V-C model but it requires much more knowledge in order to able to work fluently with it.

Speaking in terms of interacting with the database both CodeIgniter and Zend Framework can work with Doctrine which seems like the best choice nowadays. In addition to that, you can also opt for DataMapper or Gas for CodeIgniter and Propel for Zend Framework.

Want to try coding in CodeIgniter or Zend Framework?

Not a problem at all, we offer completely working CodeIgniter and Zend Framework hosting environment where you can test and develop your projects, at a very affordable price – NOW WITH 80% OFF!

As a conclusion, we can say that Zend Framework targets enterprise projects and supports big businesses by offering them a stable solution to their problems. It’s hard to learn and could be slower than other frameworks. CodeIgniter, on the other hand, is an opposite of that – it’s small, easy to learn and could be used to deploy projects faster.

Both CI and ZF have been around for quite some time and there are many experienced developers familiar with them and the choice between modern frameworks is entirely based on the developers that will be building and maintaining the project.

Useful links from the PHP Frameworks series by WebHostFace:

Part 1 – Complete guide to PHP and PHP Frameworks: Part 1 – Introduction

Part 2 – Model View Controller Architecture and Its Use in Modern PHP Frameworks

Part 3 – PHP Frameworks vs Libraries and Custom Modules

Part 4 – Laravel vs Symfony – The PHP Frameworks Comparison Battle

Part 5 – CodeIgniter vs Zend Framework – The PHP Frameworks Comparison Battle

The post CodeIgniter vs Zend Framework – The PHP Frameworks Comparison Battle appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/codeigniter-vs-zend-framework/feed/ 1
Laravel vs Symfony – The PHP Frameworks Comparison Battle https://www.webhostface.com/blog/laravel-vs-symfony/ https://www.webhostface.com/blog/laravel-vs-symfony/#respond Mon, 09 Oct 2017 07:00:27 +0000 https://www.webhostface.com/blog/?p=4086 Both Laravel and Symfony are modern, proven PHP Frameworks which implement the Model View Controller architecture. Laravel is partially built using Symfony components and is the most popular PHP framework as of recent years while Symfony has been around since 2005, 6 years before Laravel’s release in 2011. In this article, we will compare Laravel […]

The post Laravel vs Symfony – The PHP Frameworks Comparison Battle appeared first on WebHostFace Hosting & Design Blog.

]]>
Both Laravel and Symfony are modern, proven PHP Frameworks which implement the Model View Controller architecture. Laravel is partially built using Symfony components and is the most popular PHP framework as of recent years while Symfony has been around since 2005, 6 years before Laravel’s release in 2011. In this article, we will compare Laravel vs Symfony and how to test them on shared hosting servers for a good price. You can check the Best PHP Frameworks of 2017: a Beginner’s Guide [INFOGRAPHIC]

Different Frameworks have their way with dealing with common tasks and you can use most of them to achieve the same solution to a business problem. When you’re choosing between different ones there are several aspects that need to be considered. Those are mainly how the framework implements the MVC model and how it solves common issues like sessions, cookies, MySQL communication and others.

Database interaction has become a crucial security concern for all PHP applications. Apart from sanitizing input frameworks usually come with an ORM – Object Relational Mapping which is a technique that helps out to translate PHP code into SQL queries easing and speeding up the development process.

Eloquent vs Doctrine ORM

Laravel uses Eloquent as ORM which is partially inspired from Rails whether Symfony comes with Doctrine. Eloquent is simpler than Doctrine and as such it uses simplified approaches and it’s not as greatly structured. Doctrine on the other side has much more functionality and is usually preferred for bigger projects. For smaller and simpler projects that don’t need special custom SQL interaction Eloquent is the better choice but for projects that need to fit specific requirements Doctrine will be better.

Laravel comes with Blade as templating engine and Symfony uses Twig. Blade is similar to .NET MVC’s Razor in syntax and close to simple embedded PHP code. It provides simple syntax but doesn’t include much additional functionality. All of the Views are compiled into PHP code and cached until they’re modified. Twig comes with a lot of additional ways to add functionality and security. It’s also compiled into PHP code but has different syntax. When it comes down to the templating engine it’s a matter of personal choice and what you’re used to working with syntax-wise. Blade is simpler and this helps to build projects faster while with Twig you have many options.

Laravel vs Symfony

A great advantage that Laravel has is that it comes with its own CLI named Artisan which comes with many out-of-the-box features and you can use it to create your own CLI functionality.

Routing in Laravel is also simpler than in Symfony. In Laravel, you specify your routes and the functions that are executed at each one in a file that’s responsible for the routing whether in Symfony you usually use annotations to declare which function listens on which route.

Both frameworks will provide Rapid Application Development in comparison to having a project built anew. There are several main differences between the two frameworks.

Laravel is good for beginners, it leaves the structure open for external plugins and has integrated registration right off the installation. Symfony is highly modular and very configurable. It also splits functionality into app bundles which helps to structure the code. Symfony has a lot of options and aspects that can be adjusted and as such it could be bad for beginners. This is also a great advantage as experienced developers can fine-tune applications to meet specific requirements. Symfony also has a lot of functionality built in and if anything is missing it provides a stable base that you can use to fill the gaps.

Current Laravel & Symfony versions

Laravel is currently at its 5.5 version and there aren’t any plans for a 6.X version as the architecture is working well. Laravel’s developers strive to make a new release every six months which contain minor changes. Symfony’s current version is 3.3.9 and they also make new releases every six months, most of them being LTS.

Laravel is a very community driven framework made by Taylor Otwell while Symfony is developed by Sensio Labs. There is a strong debate on which is better between having software being strongly influenced by its community and having a company take full responsibility for managing a product that’s widely used. Overall PHP developers all have different opinions and there’s no “right way” that everyone agrees on.

Overall Symfony targets enterprise projects and could be an overkill for small or simple projects. Laravel is great for Rapid Application Development and can be used to deploy smaller projects in a timely manner. In most cases, the choice between PHP frameworks is entirely dependent on the team leader and the developers that will be working on the project.

There are managed hosting solutions offered both by Laravel and Symfony with several external providers being there as well. They provide different support and integration options and thus their prices vary. When it comes down to Shared Hosting only very few hosting companies are proud to offer working Laravel hosting and Symfony hosting.

Want to try coding in Laravel or Symfony?

Not a problem at all, we offer completely working Laravel and Symfony hosting environment where you can test and develop your projects, at a very affordable price – NOW WITH 80% OFF!

Useful links from the PHP Frameworks series by WebHostFace:

Part 1 – Complete guide to PHP and PHP Frameworks: Part 1 – Introduction

Part 2 – Model View Controller Architecture and Its Use in Modern PHP Frameworks

Part 3 – PHP Frameworks vs Libraries and Custom Modules

Part 4 – Laravel vs Symfony – The PHP Frameworks Comparison Battle

The post Laravel vs Symfony – The PHP Frameworks Comparison Battle appeared first on WebHostFace Hosting & Design Blog.

]]>
https://www.webhostface.com/blog/laravel-vs-symfony/feed/ 0