iMarket Digital Properties

0 %
iMarket Digital Properties Ltd
Design · Develop · Monetize · Support
  • Location:
    United Kingdom
  • City:
    London
  • Service Area:
    Global
Business Systems
Business Services
24/7 Support
Websites
Web Applications
E-commerce Solutions
Digital Platforms
Products & Services
Public & Private Networks

How to Install WordPress When Using Vagrant Folder Sync

January 4, 2018
This step assumes you have already followed these steps:
  1. Vagrant, VirtualBox, Ubuntu 16.04 Setup
  2. Install LAMP Stack on Ubuntu
Below are the final steps (with slight modifications) in How To Install WordPress On Ubuntu 14.04 which allow for php mod rewrite:move into the directory:
cd /var/www/html/site
change ownership properties, where user below is the user (e.g. root):
sudo chown -R user:www-data *
sudo chown -R :www-data /var/www/html/site/wp-content/uploads

To modify apache to allow URL rewrites:

sudo nano /etc/apache2/sites-available/000-default.conf
here we set the ServerName (e.g. localhost) and create a directory section where we allow overrides:
<VirtualHost *:80>
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html
      ServerName server_domain_name_or_IP
      <Directory /var/www/html/>
             AllowOverride All
      </Directory>
. . .
sudo a2enmod rewrite
sudo service apache2 restart
if there is not one already, create an .htaccess file:
touch /var/www/html/home/.htaccess
sudo chown :www-data /var/www/html/home/.htaccess
chmod 664 /var/www/html/home/.htaccess
Now in wordpress settings, we can got to ‘Settngs’ > ‘Permalinks’ and choose settings as necessary
Posted in TutorialsTags:
Write a comment