Sundar
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: including a PHP file via shortcode?Use this code in functions.php
function PHP_Include($params = array()) {
extract(shortcode_atts(array(
‘file’ => ‘default’ //Use the real file name here
), $params));ob_start();
include(get_theme_root() . ‘/’ . get_template() . “/$file.php”);
// Choose which directory the file is locatedreturn ob_get_clean();
}add_shortcode(‘include’, ‘PHP_Include’);
Forum: Developing with WordPress
In reply to: How to get display name by last name functionTry to use this query instead
function get_display_name_by_last_name( $last_name ) { global $wpdb; if ( ! $user = $wpdb->get_row( $wpdb->prepare( "SELECT wpu.display_name FROM {$wpdb->prefix}users AS wpu JOIN {$wpdb->prefix}usermeta AS wpum ON wpu.ID = wpum.user_id WHERE wpum.meta_key = 'last_name' AND wpum.meta_value = %s", $last_name ) ) ) return false; return $user->display_name; }page.php:
<?php echo get_display_name_by_last_name ('A1e'); ?>- This reply was modified 5 years, 10 months ago by bcworkz. Reason: code fixed
Forum: Fixing WordPress
In reply to: Remove post-per-page limit for API integrationIn functions.php , the query you have written to fetch the custom posts , remove the argument post_per_page , that will yield all the posts.
Forum: Installing WordPress
In reply to: Canβt select databaseNirmal ,
Check to make sure you have used the correct db name / username / password in the installation step , so that the script will be able to connect to the database & thats it.
If after installing you encounter this issue , make sure the db name / user name / password are correctly configured in wp-config
Forum: Fixing WordPress
In reply to: SSL created now cannot login to WPIf your website has valid “SSL” certificate & then you need to check and make a couple of edits to .htaccess file ( sometimes it may contain too many redirects & rules issues ).
Also definitely seems to be some issues with ( plugins / config settings / WP options ) stopping https source from loading. Please follow the steps below,
1) Rename the active .htaccess file name to .htaccess-old and try to access the admin login.
2) Edit wp-config.php and set display errors “ON” [ like define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_DISPLAY’, true); ]3) Access https://arobsons.co.uk/wp-login.php and check the errors and fix issues if any.
4 ) If it doesn’t work, please rename “plugins” folder name to “plugins-old” and then try to access the admin dashboard. It will work.
Hope it helps π
Forum: Fixing WordPress
In reply to: Website domain redirectsCurrently website has been configured with “W3 Total Cache” plugin and minification setup. It’s good for performance and loading speed but you need to make frequent cache source updates.
1 . Empty all caches: Delete all cached assets and resources.
2. Delete all resources cached using any of the opcode cache methods.
3. Memcached cache(s): Delete all resources cached using the memcached method.
4. Empty only the disk cache(s): Deletes any resources cached using the disk, disk:basic, or disk:enhanced methods.
5. Update Media Query String: W3TC attaches a string to the end of media resources (CSS, JS, and image files). So frequently update that string to ensure that the browsers download an updated version of these resources.These updates will help to maintain web performance and grade level of the website.
Try to restart the mysql database server & it should get resolved.
Forum: Fixing WordPress
In reply to: Cannot Upload Large ImagesYes few had similar issues when upgraded the core to 5.3.
So I would recommend you to take a complete back-up of the current site & try upgrading to the latest stable version 5.4 & this should solve the issue.
Hope it helps !!
Just Upgrading MySQL from 5.5 to 5.6 will not make much improvements to the site’s performance.
BTW: Before you upgrade make sure you have thoroughly tested all application parts & website features with the desired version of MySQL 5.6 , also make sure to take a complete back-up before upgrading so you can revert back if things break.
Current Status of your Website Details:
Application: WordPress
Version: 4.9.13 ( Site is Outdated! , definitely need to be upgraded)
Theme: wp-content/themes/porto/
Server: Apache 2.4.10
PHP : —
MySQL: 5.5Current Page Speed Score of your site : 49% – F (which is very low)
You need to make the following primary updates on the website in terms of performance & speed. .
#1 – Check your current PHP version & upgrade it to PHP 7.
PHP 7 is nearly 2x faster than any previous PHP versions, PHP 5.5 included. So You need to upgrade most optimized PHP version up to date.
#2 – Update WordPress to the newest version
— Upgrade it to WordPress 5.4 & test all compatibility.
#3 – Run a internal scan and fix potential issues if any.
#4 – Update MYSQL to the latest version
#5 – Website Performance Updates & Speed Optimization ( as per GTMetrix guidelines )
Following are the web performance factor improvements that you need to implement it in the current sites.
1. Eliminate render-blocking JavaScript
2. Analyze & Update compressions
3. E-Tags
4. Scalable Images
5. HTML & Inline CSS
6. Reduce response time
7. Specify a cache validators
8. Add Expires header
9. Optimize images etc..Finally these updates will assure your site will be kept up-to-date, secure & give better performance.
- This reply was modified 6 years, 1 month ago by Sundar.
Forum: Fixing WordPress
In reply to: Website GONE after change of main domainSorry for the delayed response.
Its difficult to solve your problem via this forum , as the rules doesn’t allow to share confidential info like server access , without which it will be difficult to resolve it.
So as of now you have 2 options , contact the hosting tech support & explain them in detail about the issue & they can certainly help you quickly.
Else hire a professional programmer & he can help you recover your site if you have the backup.
Thanks.
Forum: Fixing WordPress
In reply to: My older Posts are No longer Showing Comment SectionAre the comments visible on the WP Admin ?
If you have access to database , you can run queries to check if those comments are still available or deleted.
If they are available , then there will be options to bring it back on the website.Forum: Fixing WordPress
In reply to: Website GONE after change of main domainSorry to hear.
Can you post the URL to your website ?Forum: Fixing WordPress
In reply to: My older Posts are No longer Showing Comment SectionCan you check this setting if enabled or disabled?
settings -> Discussion -> Automatically close comments on posts older than 14 daysAlso did you recently change or upgrade the theme ?
If so check their settings as well.Hope it helps.
Forum: Fixing WordPress
In reply to: Website GONE after change of main domain@streberkatze
Don’t worry , check with your hosting provider whether they have the back-up of both the sites.
If so problem solved , explain them the situation & ask them to re-install the website files you wanted on this new domain & it can be done.
PS: Always have a latest back-up copy of all your files on your local system too , so that when something happens like this , you can recover the site without depending on a third person.
Hope it solves your problem.Forum: Fixing WordPress
In reply to: Blog Posts not showing on mobile/ipad deviceI did check the “Blog” page and posts in PC and mobile devices. It works fine in both PC & mobile screens.
I think, there seems to be issues in mobile device browser cache & WP CACHE plugin ( WP Fastest Cache ) settings.
Please clear all your browser cache , plugin caches & then check it up.
It will work.