How to install a WordPress Blog to your Laravel Website

Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern and based on Symfony.

WordPress is a content management system based on PHP and MySQL that is usually used with the MySQL.

Creating a blog using laravel isn’t difficult but why create something which is already existing and solve our primary purpose? Yes, I’m talking about WordPress. WordPress is trusted and rock-solid as a blogging platform, so let’s just install it alongside our Laravel Web Application.

So one may ask – why do I need to think of adding a blog to a laravel app? Answer to the question is simple – the benefits of SEO(Search Engine Optimization) & MOZ Rank (Domain Authority)

Who’s this for?

If you are one who understands the importance of DA & SEO Scores and wants a blog within your primary domain (ex., this article is for you.

Let’s assume you have

  • Web Server
  • A Web server running on top of Ubuntu with Apache
  • LAMP stack

Step 1: Download A Copy of WordPress

Download the latest copy of WordPress available to a temporary location. When you download the file, it will be in a zipped package. You can download the same in CLI mode using the following command.

curl -O



Not sure how to access server CLI? – For Windows System and for MAC follow my previous video on How to add domain and host websites on DigitalOcean droplet.

If you are not comfortable with the commands, download the zip file and upload it to a temporary location in your web server. Wondering how to upload files to the server? – Check this video.

Step 2: Create a Blog Directory For The WordPress Files

For such Laravel-WordPress integration, we will configure it in such a way that when you visit the Laravel application that currently resides on the root domain, you will be able to append a /blog to the domain and reach your blog.

Let’s say, your Laravel project domain is, we will ensure that blog traffics are pushed to with full support for pretty URLs, administration control and all the other bells and whistles of WordPress without disturbing the existing Laravel application.

This is how to complete the laravel-wordpress integration.

  • Create a blog directory within the public directory of your Laravel Installation
  • Place all the WordPress files in the blog directory
  • Create a new database on your server to support the new WordPress install
  • Update your apache configuration
  • Restart the apache service
  • Install WordPress

Note: Again, we make a few assumptions for this tutorial. One being that you have your own VPS, and two being that it is a LAMP stack. LAMP is Linux, Apache, MySQL, and PHP.

The index.php file in the laravel project public directory is the entry into your Laravel application. You will load the WordPress files into the public/blog directory so that the index.php file for WordPress exists in blog directory. This is the entry into your WordPress blog.

Step 3: Create a database for the WordPress install

If you have a GUI tool such as phpmyadmin installed, this will be a easy process. If not, follow the video below:

Step 4: Update Apache Configurations

Change the .htaccess file located within your WordPress or blog directory, if it does not exists use the following command

nano .htaccess


touch .htaccess
nano .htaccess

and paste the below configuration in the .htaccess file

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* -

# Redirect Trailing Slashes If Not A Folder…
# RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} (.+)/$
#RewriteRule ^ %1

# Handle Front Controller…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php 

The below settings will cause your posts infinite redirection, so ensure to comment these out

# Redirect Trailing Slashes If Not A Folder…
# RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} (.+)/$
#RewriteRule ^ %1 

Once you have updated the apache configuration file, be sure to restart the apache service using the following command

sudo service apache2 restart

Step 5: Configure wp-config.php

Set up your database configuration for the blog by renaming wp-config-sample.php to wp-config.php and fill in the credentials to connect to the new database you created in step 3.

One can manually change the wp-config.php file or let WordPress installer do it for you. If you wish WordPress installer to create the wp-config.php file, hit the URL

A snippet of that configuration file might look a bit like this.

// ** MySQL settings — You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress’);

/** MySQL database username */
define(‘DB_USER’, ‘YOUR-USER-NAME’);

/** MySQL database password */

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8’);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ‘’);

Step 6. Run Through the WordPress Install

With all of the legwork out of the way, you can now point a browser to and you will be greeted with the familiar install screen of a WordPress installation. Fill out the fields as needed and submit the data, and you should now have your working blog right alongside your Laravel application on the same domain.


How to connect DigitalOcean Droplet using sFTP FileZilla

DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.

You can transfer files from a local computer to a Droplet using a variety of different protocols and file transfer clients. DigitalOcean recommends using SFTP (SSH File Transfer Protocol) with FileZilla because it is a free, open-source, cross-platform tool with a user interface that supports newer users.

Who’s this for?

This tutorial is for anyone out there, who is trying or wants to upload files to a VPS. For this tutorial, we are referring VPS to DigitalOcean droplets.

We will use SFTP client – FileZilla to upload files to DigitalOcean droplet.

Step 1: Install FileZilla

On the machine from which you want to transfer files, download and install FileZilla. Choose the version for your operating system.

Upload project to DigitalOcean Droplet using FileZilla SFTP

Step 2: Add Site in FileZilla

Start the FileZilla application. We need to add our domain or connect our web server.

Assuming you are using MAC OS – Click File > Add Site (Windows system will have Add Site option).

The image above highlights the add site dialogue box. Few things to note here, these are

  • Host
  • Protocol
  • Login Type

Follow the image below to connect your DigitalOcean droplet.

Enter your DigitalOcean droplet IP in the host field, leaver the port field as-is.

Change the protocol from FTP to SFTP.

Also, change Login Type to Ask for password – this is recommended for security reasons. Add-in username, if you haven’t created a separate user yet, it will be root.

Click connect button.

A password pop-up box will appear. This is where you basically add the root user password. Enter the password and click “ok”.

If everything goes correctly so far, you should see the right side that says Remote site with server-side files.

Now the screen is split into two halves, where left side shows local files and the right side shows the files in the server.

Step 3: Upload Project Files to DigitalOcean Droplet

On the right side field area – next to Remote site enter the directory where you want to upload your project files.

In case you don’t have any project directory already created, follow the below

  • On the remote section – next to Remote site, type /var/www
  • Create a directory by right-clicking on the blank space right side. You should now see a popup – click create directory. Give it a name.
  • Once the above is done, you should see a directory with the name you gave. Double click the directory to enter inside the project directory.

Now, let’s find the actual project files which you want to upload to the directory.

Select the files you want to upload, right-click on the selected area and click Upload.

That should upload the files, you will be able to see them on the remote site section.

With the above, your project files are now uploaded to the server.

If you want to know more about how to configure a domain and setup your project follow our other articles to learn more – How to create subdomains on DigitalOcean, How to add domain and host websites on DigitalOcean droplet

Offshore Development

Offshore Software Development in India

Offshore Software Development in India
Offshore Software Development in India

Offshore software development is outsourcing tasks to a third-party software agency or developer(s). Such services may include web development, web app development, mobile app development, etc. Typically, a partner company providing development is from a foreign country.

Offshore Outsourcing can be done in different ways:

  • To individual developer or an agency;
  • Delegating the whole project or only certain parts/features;
  • Hire a dedicated team of developers.

Depending on the nature of the engagement or project, the above can be addressed. If you are thinking, how do I determine what should be my ideal fit, ask yourself these questions :

  • How complex is the project?
  • Does it require expertise from multiple domains or technologies?
  • Which fragment of the total project you are willing to outsource?
  • What’s the project timeline?
  • Do you have the blueprint of the complete project that you are planning to outsource?

With the above questions answered, you might have a clear overview of what is the right fit for you. We Madgeek Pvt Ltd, are a team of professional software developers experienced with all modern technologies.

Madgeek Pvt Ltd (Madgeek) is a software development company headquartered in Bangalore India with over 10 years of domain expertise. With a team of highly experienced software developers and programmers, state-of-the-art infrastructure, advanced software, and modern facilities, we have the capability to develop customized software across different platforms for a global audience as per your unique requirements.

We provide three different types of outsourcing models.

  • Fixed Design & Development Cost: If you have a short-term project, has a well-defined scope and all requirements are clear than our fixed cost software outsourcing model is best suitable. We guarantee on-time delivery of software as per requirements and development cost, which were predefined.
  • Time & Material: Clients whose requirements regularly changes and wants dedicated developers to work only on a single project, our time and material model is the best fit. In this model, there is flexibility for the client to add or remove resources as per fluctuation in requirements.
  • Dedicated Development Team: This model is best suited for clients with a large project in which requirements change as per time and business modal. Dedicate software development team is the best suitable for custom software development and mission-critical projects.

Our team of experts will be able to help you decide the best option for your offshore software development project.


How to add domain & host your websites on DigitalOcean

This article will highlight how to manage your DNS records using DigitalOcean Control Panel and host your websites on DigitalOcean.

Things You Need

  • Droplet on DigitalOcean
  • A Domain Name.
  • IP Address of your DigitalOcean Droplet.

Step 1: Setting up Nameserver

For this tutorial I am using BigRock, you may have bought the domain from some other provider but don’t worry check out this article on how to add nameserver, DigitalOcean has covered almost all domain name provider.

  • Login to your domain name provider account (For me it’s BigRock).
  • Now click on manage domain and select the domain you want to point to DigitalOcean droplet.
  • Now search for the option that’s called DNS (Domain Name Server) or just NameServer.
  • Select custom DNS and add following three Nameserver.

Outsourcing software development to India can help you reduce your software development cost & time to hit the market. Talk to our experts to learn more.

Step 2: Pointing Droplet IP to the domain name

  • Now login to your DigitalOcean account
  • Select Networking from the navigation menu
  • Now in Domain tab, you will see an option to add a domain
  • Enter your domain name (ex. and droplet IP in the input box and click on the Create Record button.

Now your Domain name setting should look something like the below image.

In the above image, I’ve added extra CNAME field with text www which is pointing to I did this because I wanted my domain to redirect to .  So in simple words, I redirected non-www URLs to www.

Feel free to comment below, if you are stuck anywhere.


How to create subdomains on DigitalOcean

This article is to demonstrate how to create subdomains on DigitalOcean droplet(VPS) in a few simple steps.

It also demonstrates how to configure apache Virtual Host configuration file. In the VPS (Virtual Private Server) world, being able to get up and running quickly (with subdomains) is priceless (especially if you’re new to it). It will save you lots of time – you can spend tweaking your code, writing tests, debugging, sharing your works with friends and family.

Who’s this for?

This tutorial is for anyone out there, who wants to set up his/her subdomains on a VPS using a provider such as DigitalOcean quickly without lots of head-to-walls banging. The principles in this tutorial apply to whichever VPS provider you are using, as long as its a Linux system, we’re on the same page.

And so, you want to achieve something like this with your domain:


If so, then you are in the right place.

I’m assuming you have a VPS or DigitalOcean Droplet configured with the NS(Name Server) records (Have demonstrated this in a video – Setup DNS from GoDaddy with DigitalOcean Host ).

Connect to your VPS or DigitalOcean Droplet using the SSH command. If you are clueless how to – check this video – For Windows System and for MAC follow my previous video on How to add domain and host websites on DigitalOcean droplet.

ssh {username}@{ip_address}

Replace {username} with the sudo user, you have created or for now, you can use root user credentials.

(NOTE: It’s recommended not to use root credentials rather create a sudo user for your activity).

Step 1: Create a new A Record

Go to networking section if you are using DigitalOcean else go to your DNS management console.

Create a new A Record with hostname being ex. alpha or ecommerce. Where redirect to is the IP address i.e. basically the IP address of the droplet.

Outsourcing software development to India can help you reduce your software development cost & time to hit the market. Talk to our experts to learn more.

Step 2: Create subdirectory & host project files

Create a directory under /var/www/ directory using the commands

cd /var/www/
mkdir subdomain
cd subdomain
sudo nano index.html

When you are inside the index.html file, write anything ex. hello world.

`Hello World`

Step 3: Configure Virtual Host

Now let’s configure the apche2 virtual host, which will allow our domains to refer to a project directory.

Type in the following commands

cd /etc/apache2/sites-available/
cp 000-default.conf

Now once you are inside the config file, change the following


Here, the ServerName is basically the domain that you want – say, ServerAlias is basically another name using which you want to refer this domain any CNAME in most case. DocumentRoot is where your project files are located (Root directory of your project)

Point DocumentRoot to the directory where your project files are located.


Save the file and restart the server

sudo service apache2 restart

Now try to access your subdomain


Are you looking for professional software or Ecommerce Designers & Developers? We happen to have a team of expert software & ecommerce designers & developers. Talk to us for customised software & ecommerce solutions.