Skip to main content

Posts

Reset wordpress Premissions on Linux

 When you try to update wordpress or install /update a plugin and fail to do so, it means you need to reset the folders and files permissions on your server. You can bulk fix the problem by updating the permissions of the directories and files in your web host location: cd /home/www/yourdomainfolder/  In your web directory root run the below command: find . -type d -exec chmod 755 {} \; This would change the access permission to all folders to rwx r_x r_x Now time to change the files permissions to -rw-r--r--  find . -type f -exec chmod 644 {} \; The Directories and files are now reset to the default. If you still face a problem it means you need to change the owner of the folders and files.
Recent posts

Use .htaccess to Redirect to HTTPS

If you are using apache webserver and would like to redirect all your traffic to the Secured Socket Layer protocol SSL, you may do that by editing the .htaccess file which resides on the html root of your hosting directory. To do so please add the below lines to your .htaccess file: #HTTPS Redirect <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] </IfModule> #End HTTPS Redirect

Connect Jupyter Notebook Pandas to Postgres

First install Python library Psycopg2 to connect to PostgreSQL: !pip install psycopg2 Now import the necessary libraries: import pandas as pd import psycopg2 as pg import pandas.io.sql as psql Connect to the DB Server: conn = pg.connect("postgres://username:password@server:port/dbname") Execute a Query: df = pd.read_sql('select* from table_name', conn) df.head()

Google Analytics on Refined Wiki Mobile Theme

Tracking mobile users on Confluence while using Refinedwiki mobile theme is not possible or straightforward using theme configuration. I found a work around that will track users on Google Analytics smoothly. Please follow the below steps: Create a js file, call is analytics.js with the analytics script code, it should look something similar to the below:   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');   ga('create', ' UA-XXXXXX ', 'auto');   ga('set', 'userId',AJS.Data.get("remote-user")); // Set the user ID using signed-in user_id.    ga('send', 'pageview'); Save your script on confluence server confluenceInstall...

linux Server out of Space

You could find your VPS out of space all the sudden especially if you are enabling logging for your website or web apps. First you need to know which directory is taking most of the size, then you can eliminate the problem or ask to increase disk place: Go to the root of your vps by typing on ur shell:# cd / Run: #sudo du -h --max-depth=1 Note which directories are using a lot of disk space . cd into one of the big directories. Run #ls -l to see which files are using a lot of space . Delete any you don't need.

IDLE subprocess didn't make connection Python 3.7

After installing Python on Windows 10. When trying to open IDLE, Python's IDE, you might get a  message saying that " IDLE's subprocess didn't make connection . Either IDLE can't start a subprocess or personal firewall software is blocking the connection ". To solve this issue just run IDLE as an Administrator, by right click on the IDLE icon and click Run as administrator. See Photo below: