autotutorial
Forum Replies Created
-
Forum: Localhost Installs
In reply to: Cannot complete migration on LAMPwith the constants temporarily overwrite the urls but in the database they are the old ones also for the post the images, read moving wordpress and use the plugin search and replace.
https://wordpress.org/support/topic/cannot-complete-migration-on-lamp/#post-12294562
Note* I hope it is a typo but in the apache configuration it is not possible to insert php code. define PHP function.Forum: Fixing WordPress
In reply to: different WP_SITEURL and WP_HOME – internal requestsYour server have support for
$_SERVER['HTTP_ORIGIN']https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/rest-api.php#L572 functionrest_send_cors_headers( $value );from your browser can you watch the sent headers? (header Origin: http://localhost:8069) in the case of a domain change including the port, $origins should be http://localhost:8069
also look at the save filters, maybe set WP_HOME.Forum: Fixing WordPress
In reply to: different WP_SITEURL and WP_HOME – internal requestsusing constants means avoiding the query to the database (otherwise said temporarily overwrites the value).
WP_HOME is the one shown to the browser.
technically you have a CORS (error for browser) it can be solved in api rest, however if you use WP_SITEURL I don’t understand why the url changes.Forum: Fixing WordPress
In reply to: Multiple Fatal Errorsok you’re using WordPress 5.3
//for administration define( 'WP_MAX_MEMORY_LIMIT', '1024M');for other info https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php
otherwise if your hosting allows it you can use php.ini or htaccess, ask your hosting.
see if this solves your problemForum: Fixing WordPress
In reply to: Multiple Fatal Errorscan you share what’s on line /homepages/46/d192996334/htdocs/XXXXXXX/XXXXX/wp-includes/wp-db.php on line 1995? https://github.com/WordPress/WordPress/blob/4.2-branch/wp-includes/wp-db.php#L1995
I’m thinking that you have permission problems and unfortunately you can’t update correct via Dashboard.
Ask your hosting what to do in this case.Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginah ok now I understand. sorry and thanks
Forum: Fixing WordPress
In reply to: Migrating to WordPress from Dot Net Corethis is the manual for the importer, WordPress uses two languages, php server side and javascript client side, has also created a block editor in javascript Gutenberg and the rest api useful for expert users.
I don’t think it’s possible to turn windows.forms into php different speech for html content. https://wordpress.org/support/article/importing-content/ ( html, xml, csv etc)Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginThis not rest api but custom endpoints
/wp-admin/post.php?post=555&action=edit
Code for not rest api (jqueryajax other JavaScript etc)$.ajax( { url: wpApiSettings.root + 'wp/v2/posts/1', method: 'POST', beforeSend: function ( xhr ) { xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce ); }, data:{ 'title' : 'Hello Moon' } } ).done( function ( response ) { console.log( response ); } );predefined endpoints for rest api for wp-json/wp/v2
Guide https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/Default wp-api.js or for api rest
<?php wp_localize_script( 'wp-api', 'wpApiSettings', array( 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ) ) ); options.beforeSend = function(xhr) { xhr.setRequestHeader('X-WP-Nonce', wpApiSettings.nonce); if (beforeSend) { return beforeSend.apply(this, arguments); } };now it is clear I can’t speak to you, I’m sorry I don’t add any more answers.
Forum: Fixing WordPress
In reply to: Double URL in every linkthe info, news, archive are entered incorrectly if you used a plugin, theme the plugin’s, theme support is the right place.
Forum: Localhost Installs
In reply to: Cannot complete migration on LAMPtechnically you export to use it later in the same context (it means database name and url don’t have to change).
for mysql from sql file just change the old database name to the new name, you need the next step, while the urls created for wordpress must be manipulated by a plugin since it could be a serialized object (it means how size the string is and more).
If you need to change the old path, you can temporarily set the constants (wp-config.php) WP_HOME and WP_SITEURL without a final slash to overwrite the value present in the database.
Obviously first backup your files and your database (if you already have these two backups, skip this step).
install a plugin to modify the old url present in your database, this guide illustrates the correct way, if by chance you cannot access your dashboard you can use the plugin described by the guide.
this argument is correct only if it is not the current path, example installation http://155.15.15.15/ transferred to http://domain.com/
https://wordpress.org/support/article/moving-wordpress/#changing-your-domain-name-and-urlsthe WordPress core needs the HOST header for correct use, for example http://mydomain.com/ the browser must send HOST: mydomain.com and the server must be configured for this purpose. preferred use is in
$_SERVER['HTTP_HOST']Forum: Fixing WordPress
In reply to: Double URL in every linkhere now I saw the problem, how did you enter the path in the wordpress menu? the defect is there
Forum: Fixing WordPress
In reply to: getting redirected1) use the http protocol and run this guide https://wordpress.org/support/article/moving-wordpress/#changing-your-domain-name-and-urls (install the plugin mentioned by that guide to replace the old domain with the new one)
2) After enabling a certificate ssl, you must set the new url in the dashboard settings and install the plugin to replace the old domain with new domain, it must also be specified for wordpress$_SERVER['SERVER_PORT']with value 443 or$_SERVER['HTTPS']with value 1 or on otherwise wordpress fails to understand when you are in https (it means infinite cycle of redirects on path https).
For this you need to consult your web server manual.
It would be nice if you backup your files and database first.Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginand see if it works in my Python script. If it does work, then yes that’s a pretty awful work around. I’d have to do the following.
but if you use rest api ( javascript API) and wp-api.js it doesn’t do its job it’s a WordPress bug, I agree to create the code for compatibility before WordPress 5.3 … but afterwards it’s madness.
Forum: Developing with WordPress
In reply to: Can’t connect to WordPress REST API without a pluginactually the guide refers to the (predefined) javascript Api (rest api) that guide code is a reference to wp-api.js (this file available from WordPress 4.7+ for wp/v2) for the predefined endpoints (wp/v2 example wp/v2/posts) it is not necessary to include nonce, why wp-api.js should be used automatically (add the nonce header in javascript)
For developers using the built-in Javascript API, this is handled automatically for you. This is the recommended way to use the API for plugins and themes. Custom data models can extend wp.api.models.Base to ensure this is sent correctly for any custom requests.
Thanks for your contribution, you can open a new bug on https://core.trac.wordpress.org
- This reply was modified 6 years, 4 months ago by autotutorial. Reason: Fix url
Forum: Fixing WordPress
In reply to: Multiple Fatal Errors547880960 522,5 MEGA BYTES, you need more value than this 547880960+1052672= 523.50390625 MEGA BYTES
https://github.com/WordPress/WordPress/blob/4.2-branch/wp-includes/wp-db.php#L1995
please lack information, WordPress version used, php in use if you are using an original copy, you have a wordpress version modified by your hosting (ask your hosting).
On line 1995 I found correspondence from WordPress 4.2 to 5.3 in WordPress 4.2.
for a complete understanding , i that the initial error is in call_user_func exactly to that line 3291 of code (it means WordPress 5.3) https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/functions.php#L3291
If you have backups of the files and the database, simply use the php file_get_contents function with the local absolute path to recover the code.
However you have 522 MEGA BYTES in your database and for php there are too many, it can be a theme or plugin conflict, after the backup deactivate all the plugins and go to the default theme one of the twenty installable.