wordpress apache permalinks not found — December 7, 2018

wordpress apache permalinks not found

there can be several reasons. For me it was the ‘mod_rewrite’. Permalinks will not work if this mode is disabled in apache because in .htaccess file created by wordpress , there is a check added. No rule will be applied if ‘mod_rewrite’ is disabled.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

on Ubunutu 16.04 you can enable it like this

sudo a2enmod rewrite
sudo service apache2 restart
Advertisements
Ubuntu Add SWAP memory — December 3, 2018
mysql join 2 tables on 2 columns — November 10, 2018
Momentjs change one date format to other — November 8, 2018

Momentjs change one date format to other

lets say {passenger_dob} is in DD-MM-YYYY and we want to convert it to YYYY-MM-DD. We will do like this

var formatted_date = moment(passenger_dob, "DD-MM-YYYY").format('YYYY-MM-DD');

lets say {passenger_dob} is in MM-DD-YYYY and we want to convert it to YYYY-MM-DD. We need to change the date format in moment() and tell moment that the date I am providing is now in MM-DD-YYYY format

var formatted_date = moment(passenger_dob, "MM-DD-YYYY").format('YYYY-MM-DD');
ubuntu get directory size — October 31, 2018
ubutnu 16 php enable module pecl http — October 30, 2018

ubutnu 16 php enable module pecl http

Tried so many things in last 2 days and I almost lost hope. But we can install it with a simple command.

sudo apt-get install php-pecl-http

followed so many conversation on stackoverflow about this topic and I was getting more and more errors.
1.https://askubuntu.com/questions/403327/install-pecl-packages-on-ubuntu
2.https://stackoverflow.com/questions/25892808/ubuntu-pecl-install-pecl-http-fail

but all thanks to this article on Installion.co.uk

PHP mkdir() show error if directory not created — October 23, 2018