autotutorial
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Replacement for current_time( ‘timestamp’ )yes you are in the right direction, the relative format is the one applied to strtotime or to the class DateTime DateTimeImmutable, remember not to insert a timezone when you have an offset from php 8.0 generates a warning.
Note:
The $timezone parameter and the current timezone are ignored when the $time parameter either is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00).
Correct Use for always.
$timezone = wp_timezone(); $my_date = new DateTime( '@' . 1500000000); $my_date->setTimezone( $timezone ); // force use a un timezone or offset +01:00 , this offset php 5.5.0I add a note for the default theme.
https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/default-constants.php#L407Forum: Developing with WordPress
In reply to: Replacement for current_time( ‘timestamp’ )// DateTimeImmutable does not change use yours functions, this is the correct use see https://www.php.net/manual/en/class.datetimeimmutable.php for all list functions DateImmutable // I'm DateTimeImmutable and Retrive current date object // options 1 from PHP 5.5.0 $array = current_datetime(); // $array have Timezone Dashboard settings $output_date_string = $array->format( 'Y-m-d H:i:s' ); // here YYYY-MM-DD HH:MM:SS $timezone = wp_timezone(); // Retrive Dashboard timezone from WordPress 5.3 // i'm DateTime $my_date = new DateTime( $output_date_string, $timezone ); $my_date->modify( 'today midnight' ); echo $my_date->format( 'Y-m-d H:i:s' ); /* // options 2 $timezone = wp_timezone(); $my_date = new DateTime( 'today midnight', $timezone ); echo $my_date->format( 'Y-m-d H:i:s' ); // options 3 $timezone = wp_timezone(); $my_date = new DateTime( 'now', $timezone ); //php 7.1 microseconds parameter added $my_date->setTime( 0, 0, 0, 0); // php 7.1 four microseconds parameter added echo $my-date->format('Y-m-d H:i:s'); // for setTime //$var->setTimezone( $timezone ); from PHP 5.2.1 */Never old PHP functions, strtotime or mktime etc.
Forum: Fixing WordPress
In reply to: Media Library permission checkshi please can you show the error?
This if not present should be reported to https://core.trac.wordpress.org- This reply was modified 6 years, 4 months ago by autotutorial.
Forum: Fixing WordPress
In reply to: Cache issue at login page after activating Cloudflarethe jetpack guide provides a single WordPress example that can use an https or http protocol but for a domain. You can also adapt the regex for multiple domains if covered by your CloudFlare account and / or you use a multisite (I hope without mu plugin) with or without mapping … the construction of a regex means match what has this value.
https://wordpress.org/support/topic/corrupted-plugins/#post-12227823
to check the current status of your certificate enter your site here, it may take 48 hours for DNS propagation, also use the private mode of chrome for debugging.
https://ssllabs.com/ssltest/analyze.htmlForum: Fixing WordPress
In reply to: Some confusion in Administration Over SSL articledefined( 'FORCE_SSL_ADMIN' );
means check if the constant is already defined, if your Server is configured for https, you can force the use https for WordPress ADMINdefine('FORCE_SSL_ADMIN', true);and this means if the origin of wp-admin is in http I redirect to https otherwise if it is already https wp-admin I do not redirect.Forum: Fixing WordPress
In reply to: Direct link wrong redirectok is the correct configuration, you can diagnose if your htaccess rewrites the
site.comurl (without www prefix) inwww.example.com.
It’s definitely a server-side rewrite.
do you also have a DNS record forsite.comor justwww.site.com?Forum: Fixing WordPress
In reply to: Direct link wrong redirectMultisite Subdomain Netwowrk
www.network.com, secondary sitens1.network.com(obviously it is not possible to insert www for secondary sites).
From WordPress 4.5 without mapping plugins, after creating the secondary site when clicking on edit, the mapping of the domains is activated (it can be any domain while with Multisite subdomain it is limited to add a subdomain to the network).Forum: Networking WordPress
In reply to: WordPress Multisite uploads directoryHi, this is a problem with the non-wordprress plugin, go here for assistance.
https://wordpress.org/support/plugin/export-media-with-selected-content/You can create your multisite on subdomain, if you install from domain.com you can add subdomains to domain.com, from WordPress 4.5 after creating the secondary sites you can click on edit and map to any domain you have (domain mapping applies without plugins and on secondary sites).
Attention the url you indicate are add on, that is subdomain for your hosting but they also have a url path if your hosting redirects from http://domain.com/yoursite.com in http://domain.com/ you can create secondary sites on subdomains ns1.domain.com ns2.domain.com etc, in this case I don’t know what to say. You need to talk to your hosting, if it is possible to transform them into full-fledged subdomains.
Read this to create your network.Forum: Networking WordPress
In reply to: Broke sites (idiot at work) please help!after backing up, clear each existing cache … cache server cache CDN, cache plugin, not cache browser.
Use the chrome private mode, disability the mu mapping plugin, delete the wp-content/sunrise.php file.
Read above the provided indications I have never used that plugin.
https://wordpress.org/support/topic/broke-sites-idiot-at-work-please-help/#post-12246335
wp-content/uploads/site/ for your PNG, GIF etc.
after creating the secondary site just click on edit and map to your liking, repeat the operation for each secondary site.Forum: Fixing WordPress
In reply to: WordPress Multisite domain mapping screwed upsecondary sites only work if you have url rewrite enabled, search online how to enable your htaccess or http.conf to allow htaccess to rewrite.
Also read here.
https://wordpress.org/support/topic/broke-sites-idiot-at-work-please-help/#post-12245105Forum: Networking WordPress
In reply to: Broke sites (idiot at work) please help!if your images for secondary sites are in wp-content/sites/ you started from WordPress 3.5 or higher, in 2019 it is sure that you have definitely started with WordPress 3.5 or higher.
Click on your database name in phpmyadmin you will see a box for a regex, enter the prefix of your current default wordpress é wp_ and the tabs for secondary sites are wp_2 or wp_3 etc.
Have you checked from your current installation?
Sorry my error , check wp_site.
From WordPress 4.5 you can map each secondary site but the network is without mapping.
in wp_blogs you should read your secondary sites two ids, site_id refers to the networkForum: Networking WordPress
In reply to: Broke sites (idiot at work) please help!Before any action you backup your files and database, check wp_base in the database which domain you used.
If you started before WordPress 3.5 you have a htacess, with WP MU you have another htaccess (in these two cases you have a folder called wp-content/blogs.dir/ for your images).
If you started with WordPress 3.5 you have another rewrite.
Can you click the link network I wrote to you before?
It tells you the configurations for wp-config and htaccess network->setupForum: Networking WordPress
In reply to: Broke sites (idiot at work) please help!@imrjs https://yourdomain.com/wp-admin/network/setup.php
Refer Mu Domain plugin (settings without plugins) https://wordpress.org/support/topic/howto-domain-mapping-without-a-plugin-instructions/