Set the perfect permissions for WordPress:
cd /path/to/wp/webroot; find . -type d -print0|xargs -0 chmod 755; find . -type f -print0|xargs -0 chmod 644; chown nginx:nginx * -R
*Update nginx:nginx to your web daemon user and group
Set the perfect permissions for WordPress:
cd /path/to/wp/webroot; find . -type d -print0|xargs -0 chmod 755; find . -type f -print0|xargs -0 chmod 644; chown nginx:nginx * -R
*Update nginx:nginx to your web daemon user and group
Recently had an issue where I was unable to upload media within WordPress. Turned out the user and group in php-fpm’s www.conf was incorrect. To fix:
vim /etc/php-fpm.d/www.conf user: nginx group: nginx
Restart php-fpm
service php-fpm restart
Redirect 301 “/path/to/dir/old.pdf” http://www.domain.com/path/to/dir/redirect.pdf
Embed the YouTube video within a container the same as the example below:
<div class="container"> <iframe src="http://www.youtube.com/watch?v=W1xZMfpuuZc?rel=0&showinfo=0" frameborder="0" allowfullscreen class="video"></iframe> </div>
Add the following to css:
.container { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; } .video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
Add a new (or append if one exists) .htccess just inside the wp-admin directory and insert the following:
order deny,allow allow from 10.10.10.10 deny from all
*Update 10.10.10.10 with your own IP. You can insert multiple “allow” rows with additional IP addresses.
Recent Comments