How to define a remote uploads directory?

IMHO a better approach would be adding the remote server’s directory as a locally mounted directory and use this as wp-content directory. Doing this on the block/filesystem level means that WordPress won’t notice a thing, since it appears to WordPress as normal local directory. You may want to have a look at sshfs in order … Read more

Admin-Ajax.php, SSL, Non-SSL

I would recommend to define this constant in your wp-config.php to force HTTPS on admin: define(‘FORCE_SSL_ADMIN’, true); Also, there is a function called is_admin() which could be helpful in your case. if ( is_admin() ) { $_SERVER[‘HTTPS’] = ‘on’; } However, if you have a rule in your web server forcing all wp-admin and wp-login.php … Read more

Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?

Is it possible to set different WP_CONTENT_URL values for different sub-sites in wp-config.php ? Ans: Yes it is. If sub sites are installed on sub-domain, An example to define it this way – define( ‘CURRENT_SITE_DOMAIN’, $_SERVER[‘HTTP_HOST’] ); if( ‘sub1.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub1-abcdefghijk.cloudfront.net/wp-content’ ); } elseif( ‘sub2.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub2-abcdefghijk.cloudfront.net/wp-content’ … Read more

Renaming wp-content folder dynamically

Don’t do what seems to be possible… You can use the possibility to change the WordPress constants WP_CONTENT_DIR and WP_CONTENT_URL in your wp-config.php. BUT it really, really, really, really is not recommended. Why? not recommended?? It’s pretty easy: Just do a cross file search (with your IDE or for e.g. Notepad++) for wp-content and you’ll … Read more

WP Config for FTP credentials

define(‘FS_METHOD’, ‘ftpext’); define(‘FTP_BASE’, ‘/path/to/wordpress/’); define(‘FTP_CONTENT_DIR’, ‘/path/to/wordpress/wp-content/’); define(‘FTP_PLUGIN_DIR ‘, ‘/path/to/wordpress/wp-content/plugins/’); define(‘FTP_PUBKEY’, ‘/home/username/.ssh/id_rsa.pub’); define(‘FTP_PRIKEY’, ‘/home/username/.ssh/id_rsa’); define(‘FTP_USER’, ‘username’); define(‘FTP_PASS’, ‘password’); define(‘FTP_HOST’, ‘ftp.example.org’); define(‘FTP_SSL’, false); http://digwp.com/2010/11/ftp-in-wpconfig/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)