How to hide “Featured Image”?
- Add custom css[css].mh-image-placeholder { display: none; }[/css]
Permission script
[js]
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
WS_GROUP=www-data # <-- webserver group
# reset to safe defaults
find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \;
find ${WP_ROOT} -type d -exec chmod 755 {} \;
find ${WP_ROOT} -type f -exec chmod 644 {} \;
# allow wordpress to manage wp-config.php (but prevent world access)
chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php
chmod 660 ${WP_ROOT}/wp-config.php
# allow wordpress to manage wp-content
find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \;
find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \;
find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \;
[/js]
Run by the following command
[js]./fix-wordpress-permissions.sh
How to transfer localhost to server site?
Database
- Export DB from localhost into sql file
- Create new DB on server
- Import sql file
- Add new MySQL user
- Assign new user to DB with all privileges
- In “wp_options” table, change “siteurl” and “home” to your domain
Config web server
- Open “wp-config.php” file
- Change “DB_NAME”, “DB_USER”, “DB_PASSWORD”, “$table_prefix”
Config url
- Login to your WordPress admin panel
- Settings » General » Save Changes
- Settings » Permalink » Save Changes
Fix broken media links
- Go to phpMyAdmin, click on your database and then click on SQL from top menu
- Write this query, but don’t forget to change it with your own local site and live site URLs
[sql]UPDATE wp_posts SET post_content = REPLACE(post_content, ‘localhost/test/’, ‘www.yourlivesite.com/’);[/sql]
Install theme and plugins
- Theme – MH Magazine
- Plugin – Enlighter
Leave a Reply