Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Cool! Thanks for the link. That’s an interesting find. I haven’t used admin-ajax.php before for handling AJAX requests. I went with the REST API because I have previously written REST APIs using the Express JavaScript MVC framework and the PHP Zend Framework MVC framework. I also think the REST API stuff is going to be the way WordPress goes in the future after seeing Calypso and Gutenberg, which both heavily use Facebook’s React library and the WordPress REST API.

    I totally understand Angular being wayyyy too much sometimes. I’ve looked at Vue a little bit, and I agree it can be a much better fit than Angular. I’ve used React, too, and found it is much more lightweight than Angular and more convenient when I just want to do a single task with a JavaScript app.

    Hello islp!

    I also write single page applications using Angular 4 as the front-end framework and WordPress’s REST API as a backend. I am familiar with working with wp_nonce and getting the nonce. I usually pass the wp_nonce as a X-WP-Nonce header. If you’re using the WordPress REST API, WordPress should handle processing the nonce for you, especially if you’re using WordPress functions like current_user_can() and is_user_logged_in(). If your JavaScript single page application is making HTTP requests when submitting the user’s data, I recommend considering using a custom REST API endpoint instead of sending the request to a PHP file. That would make your application more portable and WordPress-compatible. You probably could reuse all of your PHP code by calling the functions or methods it defines from a WordPress REST API Controller class.

    The WordPress Codex has documentation on the REST API here:
    https://developer.ww.wp.xz.cn/rest-api/

    If it helps, I have a boilerplate/skeleton project I wrote that implements these concepts with Angular 4 as the single page application and with WordPress’s REST API as a backend:
    https://github.com/jadonn/ng-wp-plugin-skeleton

    That project is for a single page application plugin that is embedded in the WordPress admin dashboard as a new admin dashboard page. It’s pretty basic, but I think it demonstrates some of the things you’re trying to do, like sending requests with a nonce from a single page application to WordPress for data and for processing.

    I hope this helps. I’m happy to try to help with more information if you have more questions.

    Hello claudioberardi,

    I am sorry to hear you are having issues using a reverse proxy with WordPress. You generally should be able to use WordPress as normal using a reverse proxy, but the reverse proxy configuration can cause issues when trying to access your website if it’s not configured properly. I am currently doing a lot of work with nginx as a reverse proxy cache in front of Apache, and it is really easy to make your website not load properly when you configure nginx, for example. What reverse proxy are you using? It may be helpful to have a bit more information about your configuration. What errors do you see when you try to login? Does the admin login page load?

    Forum: Fixing WordPress
    In reply to: Searching plugins

    Hello Damien!

    It’s possible there is an issue connecting to ww.wp.xz.cn from your website. That can happen from time to time, and it’s usually temporary. If there is a problem like this, it’ll be logged to your browser’s console log. If you’re not familiar with the console log, it’s kind of like the error log for the web page your browser is trying to load. In most browsers, you can press Ctrl+Shift+J on Windows/Linux computers or Cmd+Opt+J on Macs. If there is an error message, it’ll show up on the console tab in red text. There probably will be other text in yellow or white/gray that can be safely disregarded.

    You could also check with your hosting account for any errors being logged if you have access to view errors for PHP or for website requests. If you are unfamiliar with checking these errors, I recommend contacting your hosting provider for assistance.

    Hello hazelorbs!

    I want to make sure your situation can be completely understood. Are you wanting the website you setup for humblewinesnob.com to use lehighvalleywinelife.com instead of humblewinesnob.com? If yes, then you should be able to change the domain for your WordPress website through your admin dashboard. The Codex has a page on how to do this:

    https://codex.ww.wp.xz.cn/Changing_The_Site_URL

    You may need to add lehighvalleywinelife.com into your hosting account’s administration panel to use the same folder as humblewinesnob.com before you can use lehighvalleywinelife.com.

    If you are trying to merge the two websites together, that will likely be more difficult.

    Hello cogit!

    I want to caution you now that there are people who specialize in configuring and setting up each of the different kinds of server software you can setup for your website. All of these services are highly configurable, and configuring them for any real benefit requires a reasonable level of complexity and knowledge. I work on designing high-performance server configurations for WordPress as part of my job, for example.

    In my experience, a regular LAMP (Linux, Apache, MySQL, PHP) configuration is usually fine for most WordPress websites with some kind of page caching plugin installed.

    Services like PHP-FPM, database-object caching (such as memcached), full page caching (nginx and Varnish) can help provide a quicker loading speed and provide lower resource usage for higher traffic websites.

    I recommend seeing if your host has any resources for these kinds of things. They often do. I know hosting providers using the popular hosting panel cPanel will have PHP-FPM support if they’re using a somewhat recent version of cPanel.

    Of these things, nginx reverse proxy caching in front of Apache may provide the best mix of performance, resource efficiency, and ease of configuration. If you have cloud hosting, your hosting provider may even have a package type with a pre-built configuration for this or other similar high-performance loadouts. That seems to be an increasingly popular thing with cloud hosting providers nowadays. I do recommend checking to see what kind of support your host has to help you with this kind of stuff. It would be good to work with someone with experience making these changes if you’re planning on deploying them in a production environment. It’s really easy to make all of your websites not load properly when using the other services in addition to the default LAMP stack.

    Hello moha9454!

    I looked at your website. I see what you are talking about. It looks like the image links are different on the front page and on the other pages. On the front page, the image URL is:

    http://taxisguildford.co.uk/wp-content/uploads/2017/06/Guildford-Taxis-3-2-e1497344340941.png

    On the other pages, the URL looks like this:

    http://taxisguildford.co.uk/services/wp-content/uploads/2017/06/Guildford-Taxis-3-2-e1497344340941.png
    http://taxisguildford.co.uk/fleet/wp-content/uploads/2017/06/Guildford-Taxis-3-2-e1497344340941.png

    It looks like the page’s name is being appended to the URL for the sub pages. The original site http://www.surreycarsguildford.com does not appear to be doing that. Its image URL looks to be http://surreycarsguildford.com/wp-content/uploads/2016/03/logo.png for all of the pages.

    It may be worthwhile to try removing and adding the logo again to the sub pages. I can’t say for sure why that is happening with your sub-pages on the new site unfortunately.

    Hello eclipapps!

    I am sorry to hear you are having a hard time with your website. Have you been able to try changing the site URL back to http://www.andi.nl instead of http://www.andi.nl/home? I know you said you do not have access to your admin dashboard, but you can still change the site URL through the wp-config.php file or through your website’s database directly. The Codex has information on how to do this kind of thing:

    https://codex.ww.wp.xz.cn/Changing_The_Site_URL

    It’s always good to make a backup of the file or database before editing it, if you can, just to be safe.

    In addition, the server’s Apache error log will have a cause listed for the 500 error you are seeing. That usually can provide helpful information towards resolving the issue. Of course, in this instance, I’m betting it’ll probably say something about too many redirects, which wouldn’t be a super helpful error. Your IP address looks like it belongs to a web hosting provider. If you aren’t familiar with checking that log or with working with the wp-config.php file or your site database, it may be worthwhile contacting your host for assistance.

Viewing 8 replies - 1 through 8 (of 8 total)