PhantomThemes Editorial

Redirecting Old Website to New Website using .htaccess

September 15, 2018| PhantomThemes Editorial|

When you migrate your website from old domain to new one, you want to preserve the link traffic to new web address. In Apache web server we use Apache Rewrite Rules to add the redirection features. The file with this type of rules added into file name .htaccess The apache codes to add this features are as follows: RewriteEngine On RewriteCond %{HTTP_HOST} ^odlwebsite.com$ [OR] RewriteCond %{HTTP_HOST} ^www.newwebsite.com$ RewriteRule (.*)$ http://www.newwebsite.com/$1 [R=301,L] If you just want to redirect the single page address, the code will be as follows: Redirect 301 /old-post-page.html http://www.newwebsite.com/new-page.html

How to Change the WWW Root Directory on Wampserver 3

Yes, we all want to save our files and documentation from system crash of C Drive. To avoid this issue we generally locate our “WWW” or “htdocs” directory in different location from the default installation directory i.e. C Drive. So it’s very easy to change the “WWW” directory in latest WampServer 3 that comes with PHP 5.6 , 7.x , MySQL as well as MariaDB.  Click on WampServer icon in right side bottom taskbar Select the Apache menu  -> httpd-vhosts.conf from the Pullup menu box. Search (CTRL + F)for the term “DocumentRoot” Change the DocumentRoot path DocumentRoot “${INSTALL_DIR}/www” <Directory “${INSTALL_DIR}/www/”> to your custom directory e.g. DocumentRoot “E:/www” <Directory “E:/www/”> Save your changes and “Restart All Services” When you browse to http://localhost, before the directory change the localhost window looks like this one. And after the change for directory the localhost window looks like this one.

Best Free Syntax Highlighter WordPress Plugins

1. Enlighter – Customizable Syntax Highlighter Description Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. It’s build in PHP and uses the MooTools(Javascript) based EnlighterJS to provide a beautiful code-appearance. Using it can be as simple as selecting an editor style or adding shortcode around your scripts which you want to highlight and Enlighter takes care of the rest. An easy to use Theme-Customizer is included to modify the build-in themes without any css knowlegde! It also supports the automatic creation of tab-panes to display code-groups together (useful for multi-language examples – e.g. html+css+js) Theme Demo – Language Examples PLUGIN FEATURES Support for all common used languages including powerful generic highlighting Full Visual-Editor (TinyMCE) Integration (Admin Panel + Frontend) Theme Customizer including LIVE Preview Mode Inline Syntax Highlighting Tab-Indentation mode to align code with the tab key (single line and block selection) Markdown fenced code blocks bbPress shortcode + markdown code blocks support Shortcodes within content, comments and…    read more 

How to Enable WordPress Debug Mode

While developing WordPress theme we need to consider various factors. There are lot of plugins that help to test and debug WordPress theme. e.g. For WP.org standards theme, community use Theme Check Plugin to test the standard of theme development guidelines. If you haven’t enabled the WP_DEBUG value, it will display the warning notification like the below. Here, I am going to guide you on how to enable the WordPress debug mode. To enable WordPress Debug mode we need to edit the wp-config.php file. Open wp-config.php in your root WordPress Installation folder. On local computer : C://wamp64/www/wordpress/wp-config.php On Remote Server : public_html/wp-config.php Add the following code below this comment /* That’s all, stop editing! Happy blogging. */ define( ‘WP_DEBUG’, true ); Debugging PHP code can be part of any project, but WordPress comes with specific debug environment designed to simplify the process as well as standardize code across the core,…    read more 

Change PHP version 5.6 to 7.x in WampServer 3

 Click on WampServer icon in right side bottom taskbar Select the PHP menu  ->Version  from the Pullup menu box. Check the version via browsing http://localhost or via command line typing following command php -version Done ! Recommended Readings: https://planetthemes.com/how-to-change-the-www-root-directory-on-wampserver-3/

How to Reset or Create new admin user account in WordPress via FTP

Quickest and Easy way to create WordPress admin account WordPress very easy to use tool in Content Management System. To create new user easily via WordPress Dashboard you need go to the : WordPress admin login-> Dashboard->User -> Add New User Fill in the user information and submit.     Why you really need to Create Admin user account via FTP? Freelancer and web design agency works with many clients. They usually  get the Cpanel / Web Hosting login details but they forget to supply the Administrator user credentials. Sometime the time gap between client and design company almost differ by day and night. So if you ask for Admin account to client it will make your project 12-24 delay in projects. Also sometime your site might get hacked with password changed !!!!! You do not have access to WordPress admin area, at that time this method act as easy…    read more