permissions

 

1. All directories should be 755 or 750
2. All files should be 644 or 640. Exception: wp-config.php should be 440 or 400 to prevent other users on the server from reading it.
3. No directories should ever be given 777, even upload directories. Since the php process is running as the owner of the files, it gets the owners permissions and can write to even a 755 directory.
4. If you use Permalinks you should also change permissions of .htaccess to make sure that WordPress can update it when you change settings such as adding a new page, redirect, category, etc.. which requires updating the .htaccess file when mod_rewrite Permalinks are being used.
chmod 755 -R wordpress
chmod 440 wp-config.php
chmod -v 666 .htaccess
https://wordpress.org/support/article/changing-file-permissions/

https://stackoverflow.com/questions/18817744/change-all-files-and-folders-permissions-of-a-directory-to-644-755

Putting FTP Info in wp-config

 

wp-config.php (NO FTP)
 define('FS_METHOD', 'direct'); (copy from sublime)

wp-config.php (FTP)
 define('FS_METHOD', 'ftpext');
 define('FTP_BASE', '/home/....');
 define('FTP_USER', 'username');
 define('FTP_HOST', 'host.com');
 define('FTP_SSL', false);

DB:
wp_options: option_name = ftp_credentials

Putting FTP Info in wp-config tutorial:
https://digwp.com/2010/11/ftp-in-wpconfig/

PLUGIN:
ftp-access plugin

EXTRA INFO (db & etc)
https://www.binarymoon.co.uk/2010/07/easy-wordpress-updates-store-ftp-info-wpconfigphp/

Taxonomy admin custom column

https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$taxonomy_id_columns
function my_custom_taxonomy_columns( $columns )
{
    $columns['admin_field_name'] = __('Hide');
    return $columns;
}
add_filter('manage_edit-TAXNAME_columns' , 'my_custom_taxonomy_columns');

function my_custom_taxonomy_columns_content( $content, $column_name, $term_id )
{
    if ( 'admin_field_name' == $column_name ) {
	$content = 'content';
    }
    return $content;
}
add_filter( 'manage_TAXNAME_custom_column', 'my_custom_taxonomy_columns_content', 10, 3 );

Post Type admin custom column

https://rudrastyh.com/woocommerce/columns.html
add_filter( 'manage_edit-product_columns', 'add_custom_column' );
function add_custom_column( $columns ){
    $columns['artikulai'] = 'Artikulai';
    return $columns;
}

add_action( 'manage_posts_custom_column', 'populate_columns' );
function populate_columns( $column_name ){
    if( $column_name == 'artikulai' ) {
        echo '000';
    }
}